changeset 1061:3700165d68dc

core (xmpp): onMessage handles an eventual subject (used for announcement / headline message)
author souliane <souliane@mailoo.org>
date Mon, 02 Jun 2014 19:25:06 +0200
parents aa15453ec54d
children 95758ef3faa8
files src/core/xmpp.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/xmpp.py	Fri May 23 09:59:35 2014 +0200
+++ b/src/core/xmpp.py	Mon Jun 02 19:25:06 2014 +0200
@@ -126,7 +126,8 @@
         for e in message.elements():
             if e.name == "body":
                 data['body'] = e.children[0] if e.children else ""
-                break
+            elif e.name == "subject" and e.children:
+                data['extra']['subject'] = e.children[0]
 
         data['type'] = message['type'] if message.hasAttribute('type') else 'normal'