Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits: d022a925 by Philipp Hörist at 2018-07-07T18:19:36+02:00 Add stanza received/sent event We only had a data received/sent event which was enough for a long time because servers used one tcp packet per stanza. Now servers send multiple stanzas in one tcp packet, data received/sent can contain more than one stanza which makes this new event necessary - - - - - 1 changed file: - nbxmpp/dispatcher_nb.py Changes: ===================================== nbxmpp/dispatcher_nb.py ===================================== --- a/nbxmpp/dispatcher_nb.py +++ b/nbxmpp/dispatcher_nb.py @@ -417,6 +417,9 @@ class XMPPDispatcher(PlugIn): #log.info('dispatch called: stanza = %s, session = %s, direct= %s' # % (stanza, session, direct)) + + self.Event('', 'STANZA_RECEIVED', stanza) + if not session: session = self session.Stream._mini_dom = None @@ -571,6 +574,8 @@ class XMPPDispatcher(PlugIn): if self._owner._registered_name and not stanza.getAttr('from'): stanza.setAttr('from', self._owner._registered_name) + self.Event('', 'STANZA_SENT', stanza) + self._owner.Connection.send(stanza, now) # If no ID then it is a whitespace View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/d022a925797716b1d59d7e5113a691886537e1b2 -- View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/d022a925797716b1d59d7e5113a691886537e1b2 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits