diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2008-11-03 17:25:08 +0300 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2008-11-03 17:25:08 +0300 |
commit | 67d19a226d2db8f79cc1a93f92913424245b3dd5 (patch) | |
tree | 83f54b33f7e5c983c9756d47f62bd899fcc7899b /src/common/connection_handlers.py | |
parent | bf93cb76f123fdb7631a3ca25e1a6ef6219d671c (diff) |
handle mood in messages, send mood in message if pep is not supported on server. Fixes #4449
Diffstat (limited to 'src/common/connection_handlers.py')
-rw-r--r-- | src/common/connection_handlers.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 1aa57e95d..652f2a411 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -1805,6 +1805,18 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco, session.control.conv_textview.hide_xep0184_warning( msg.getID()) + # Check mood in message + if msg.getTag('mood', namespace=common.xmpp.NS_MOOD): + mood_iq = msg.getTag('mood', namespace=common.xmpp.NS_MOOD) + mood = None + text = None + for ch in mood_iq.getChildren(): + if ch.getName() != 'text': + mood = ch.getName() + else: + text = ch.getData() + pep.handle_mood(self.name, jid, mood=mood, text=text, retract=False) + if encTag and self.USE_GPG: encmsg = encTag.getData() |