jabber_mirror: Only mirror messages from streams that end in '/xmpp'

(imported from commit 5213d40063361ffcf073772580ac0f699228cb3f)
This commit is contained in:
Zev Benjamin 2014-02-28 15:15:43 -05:00
parent 0e3af9b238
commit 204e7e7e90
1 changed files with 5 additions and 1 deletions

View File

@ -154,7 +154,11 @@ class ZulipToJabberBot(object):
logging.exception("Exception forwarding Zulip => Jabber")
def stream_message(self, msg):
room = stream_to_room(msg['display_recipient'])
stream = msg['display_recipient']
if not stream.endswith("/xmpp"):
return
room = stream_to_room(stream)
jabber_recipient = "%s@%s" % (room, options.conference_domain)
outgoing = self.jabber.make_message(
mto = jabber_recipient,