anonymous
2009-12-31 12:38:42 UTC
URL:
<http://gna.org/bugs/?15022>
Summary: MUCClient cannot chain callbacks due to explicit
return of true
Project: XMPP4R
Submitted by: None
Submitted on: Thursday 12/31/2009 at 13:38 CET
Category: None
Severity: 4 - Important
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email: erik-dpFGfBmBit+JQ7yn63+***@public.gmane.org
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
I'm using xmpp4r 0.5 and I've run into an easy-to-fix bug that prevents me
from establishing multiple message or presence callback lists on the same
MUCClient. It is my understanding that the callback lists will send a
message to every callback from highest priority to lowest until one of those
callbacks happens to return true (to indicate the message was handled) and
that callbacks that are not intended to consume the message should return
false.
In MUCClient#activate, the callbacks are established for messages and
presence, but only one callback can respond because no matter the return
value of the callbacks in MUCClient's lists, the main callback always returns
true if the message belongs to the MUC. This can be fixed by removing the
lines that return true. In my version, these are lines 364 and 373.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?15022>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
<http://gna.org/bugs/?15022>
Summary: MUCClient cannot chain callbacks due to explicit
return of true
Project: XMPP4R
Submitted by: None
Submitted on: Thursday 12/31/2009 at 13:38 CET
Category: None
Severity: 4 - Important
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email: erik-dpFGfBmBit+JQ7yn63+***@public.gmane.org
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
I'm using xmpp4r 0.5 and I've run into an easy-to-fix bug that prevents me
from establishing multiple message or presence callback lists on the same
MUCClient. It is my understanding that the callback lists will send a
message to every callback from highest priority to lowest until one of those
callbacks happens to return true (to indicate the message was handled) and
that callbacks that are not intended to consume the message should return
false.
In MUCClient#activate, the callbacks are established for messages and
presence, but only one callback can respond because no matter the return
value of the callbacks in MUCClient's lists, the main callback always returns
true if the message belongs to the MUC. This can be fixed by removing the
lines that return true. In my version, these are lines 364 and 373.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?15022>
_______________________________________________
Message sent via/by Gna!
http://gna.org/