plugin XEP-0085: Chat State Notifications

- new "options" parameter to send chat states
    - plugin command export: messages without body are now delivered (since all the chat states other than "active" need them)
This commit is contained in:
souliane 2013-09-05 20:48:47 +02:00
commit 9cb7071e89
8 changed files with 368 additions and 33 deletions

View file

@ -107,8 +107,9 @@ class CommandExport(object):
try:
body = [e for e in message.elements() if e.name == 'body'][0]
except IndexError:
warning("Received message without body")
return False
# do not block message without body (chat state notification...)
warning("No body element found in message, following normal behaviour")
return True
mess_data = unicode(body) + '\n'