Before handling a message, check the sender if the bot

This commit is contained in:
Alexei Sorokin 2017-02-22 01:16:14 +03:00
parent a41e3051a0
commit 6094b074cc
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ class Hptoad:
if event["type"] == "groupchat":
nick = event["mucnick"]
self.handle_muc_message(body, nick, from_id)
if nick != self.bot_nick:
self.handle_muc_message(body, nick, from_id)
elif event["from"].bare == self.jid:
# Use resource as a nickname with self messages.