xmpp4moz should not have default event handler
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SamePlace |
New
|
Undecided
|
Unassigned |
Bug Description
I made a handler for service discovery request. Then by testing it, I discovered that there is already a default handler for it and nowhere to deactivate it (or at least it is not documented anywhere).
Hence when I sent my service discovery request to my agent using xmpp4moz, I got two response handlers, mine and the default one:
<iq from='my@
<query xmlns='http://
<identity category='client' type='pc' name='xmpp4moz'/>
<feature var='http://
</query>
</iq>
Of course this is a wrong behaviour. There must not be two (different!) responses for a same request. I think this event handler should be moved to sameplace, for which I guess it must have been created, and should not be present in the bare xmpp4moz library (on my tests, sameplace is deactivated, so I know this comes from xmpp4moz).
Hi again,
looking to the code, the file to modify is content/ service/ client_ service. js, and lines 223 to 241 must be removed. These are the lines which generates a disco#info result. I would suggest you to move this to sameplace so that it will be used only for sameplace, not for the generic XMPP lib xmpp4moz.
Note that I am reading this in the downloadable released and development version, not from any current trunk (if you use a revision manager, I have not found it). So maybe the lines are different in your current branch. But anyway this is easy to find by searching for the "disco#info" string.
Thanks for this nice API.
Regards,
Jehan