Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sends all presence messages to _presence_handlers #59

Closed
wants to merge 1 commit into from

Conversation

mohangk
Copy link

@mohangk mohangk commented May 24, 2015

Currently any presence message that does not have
an ‘x’ tag does not get send to the
presence_handler. This means error messages such
as

<presence xmlns='jabber:client' type='error' to=‘xx’ from=‘xx/test'> <error type='cancel'> <not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> </error> </presence>
does not get passed to the handler. This results in
errors like this not being handled and client code
not knowing about it and instead assuming
everything is fine.

This commit removes the custom handling and passes
all presence messages to the handlers attached,
which is how the code has always worked in the case
of the message_handlers.

This way error handling can be implemented in the
presence_handlers, as how they are being done in
the message_handlers.

Currently any presence message that does not have
an ‘x’ tag does not get send to the
presence_handler. This means error messages such
as

<presence xmlns='jabber:client' type='error' to=‘xx’ from=‘xx/test'>
<error type='cancel'>
  <not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</presence>

does not get passed to the handler. This results in
errors like this not being handled and client code
not knowing about it and instead assuming
everything is fine.

This commit removes the custom handling and passes
all presence messages to the handlers attached,
which is how the code has always worked in the case
of the message_handlers.

This way error handling can be implemented in the
presence_handlers, as how they are being done in
the message_handlers.
@jcbrand jcbrand force-pushed the master branch 2 times, most recently from 1da5f8c to ffe565e Compare January 25, 2017 14:21
@jcbrand
Copy link

jcbrand commented Mar 11, 2017

The MUC plugin is now in its own repo

@jcbrand jcbrand closed this Mar 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants