jabber_mirror: Don't try to mirror messages from rooms themselves

These are usually administrative messages.

(imported from commit 58cbbc739fdd47acc586c235aedd2fccc83654fd)
This commit is contained in:
Zev Benjamin 2014-03-02 23:00:26 -05:00
parent 6609291d54
commit 32ec19cb12

View file

@ -142,6 +142,10 @@ class JabberToZulipBot(ClientXMPP):
subject = "(no topic)"
stream = room_to_stream(msg.get_mucroom())
jid = self.nickname_to_jid(msg.get_mucroom(), msg.get_mucnick())
if str(jid) == "@" + options.jabber_domain:
# Messages from the room itself have no nickname. We should not try
# to mirror these
return
sender = jid_to_zulip(jid)
zulip_message = dict(
forged = "yes",