sounds.py: don't play sounds on messages from self

This commit is contained in:
James Booth
2016-11-06 23:12:48 +00:00
parent e2ab722f93
commit ff4b5198d8
3 changed files with 20 additions and 0 deletions

View File

@@ -175,6 +175,13 @@ def prof_post_chat_message_display(barejid, resource, message):
def prof_post_room_message_display(barejid, nick, message):
my_nick = prof.get_room_nick(barejid)
if not my_nick:
return
if my_nick == nick:
return;
enabled = prof.settings_boolean_get("sounds", "enabled", False)
if not enabled:
return