plugin android: don't send notification if message comes from ourself (from an other device)
This commit is contained in:
parent
4ca9acadf9
commit
8ce1861529
1 changed files with 8 additions and 2 deletions
|
|
@ -155,8 +155,14 @@ class AndroidPlugin(object):
|
|||
pass
|
||||
|
||||
def _notifyMessage(self, mess_data, client):
|
||||
# send notification if there is a message and it is not a groupchat
|
||||
if mess_data["message"] and mess_data["type"] != C.MESS_TYPE_GROUPCHAT:
|
||||
"""Send notification when suitable
|
||||
|
||||
notification is sent if:
|
||||
- there is a message and it is not a groupchat
|
||||
- message is not coming from ourself
|
||||
"""
|
||||
if (mess_data["message"] and mess_data["type"] != C.MESS_TYPE_GROUPCHAT
|
||||
and not mess_data["from"].userhostJID() == client.jid.userhostJID()):
|
||||
message = mess_data["message"].itervalues().next()
|
||||
try:
|
||||
subject = mess_data["subject"].itervalues().next()
|
||||
|
|
|
|||
Loading…
Reference in a new issue