diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-09-20 16:29:55 +0900 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-09-20 16:52:11 +0900 |
commit | 5a5c1fe9920f0a6c571e8c33f650371879de35dd (patch) | |
tree | 510ee5c2e5cbd224986acb5c77bd4a0056801375 /poezio/core | |
parent | f252f66b5093e76bb0c0b7dea2020e4f70da9598 (diff) | |
download | poezio-5a5c1fe9920f0a6c571e8c33f650371879de35dd.tar.gz poezio-5a5c1fe9920f0a6c571e8c33f650371879de35dd.tar.bz2 poezio-5a5c1fe9920f0a6c571e8c33f650371879de35dd.tar.xz poezio-5a5c1fe9920f0a6c571e8c33f650371879de35dd.zip |
Stop using deprecated aliases from slixmpp.
Diffstat (limited to 'poezio/core')
-rw-r--r-- | poezio/core/core.py | 2 | ||||
-rw-r--r-- | poezio/core/handlers.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py index b3aea9a6..6d20fdf7 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -928,7 +928,7 @@ class Core(object): Takes a stanza of the form <message type='error'><error/></message> and return a well formed string containing the error informations """ - sender = stanza.attrib['from'] + sender = stanza['from'] msg = stanza['error']['type'] condition = stanza['error']['condition'] code = stanza['error']['code'] diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index e8f1dd68..cf1c71f5 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -146,7 +146,7 @@ class HandlerCore: if jid.bare in self.core.pending_invites: return # there are 2 'x' tags in the messages, making message['x'] useless - invite = StanzaBase(self.core.xmpp, xml=message.find('{http://jabber.org/protocol/muc#user}x/{http://jabber.org/protocol/muc#user}invite')) + invite = StanzaBase(self.core.xmpp, xml=message.xml.find('{http://jabber.org/protocol/muc#user}x/{http://jabber.org/protocol/muc#user}invite')) inviter = invite['from'] reason = invite['reason'] password = invite['password'] @@ -200,7 +200,7 @@ class HandlerCore: When receiving private message from a muc OR a normal message (from one of our contacts) """ - if message.find('{http://jabber.org/protocol/muc#user}x/{http://jabber.org/protocol/muc#user}invite') != None: + if message.xml.find('{http://jabber.org/protocol/muc#user}x/{http://jabber.org/protocol/muc#user}invite') != None: return if message['type'] == 'groupchat': return @@ -1025,7 +1025,7 @@ class HandlerCore: """ room_from = message['from'] tab = self.core.get_tab_by_name(room_from, tabs.MucTab) - status_codes = set([s.attrib['code'] for s in message.findall('{%s}x/{%s}status' % (tabs.NS_MUC_USER, tabs.NS_MUC_USER))]) + status_codes = {s.attrib['code'] for s in message.xml.findall('{%s}x/{%s}status' % (tabs.NS_MUC_USER, tabs.NS_MUC_USER))} if '101' in status_codes: self.core.information('Your affiliation in the room %s changed' % room_from, 'Info') elif tab and status_codes: @@ -1312,7 +1312,7 @@ class HandlerCore: status = iq['command']['status'] xform = iq.xml.find('{http://jabber.org/protocol/commands}command/{jabber:x:data}x') if xform is not None: - form = self.core.xmpp.plugin['xep_0004'].buildForm(xform) + form = self.core.xmpp.plugin['xep_0004'].build_form(xform) else: form = None |