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 1b946b8565
commit 810b219f8c

View file

@ -154,7 +154,11 @@ class ZulipToJabberBot(object):
logging.exception("Exception forwarding Zulip => Jabber") logging.exception("Exception forwarding Zulip => Jabber")
def stream_message(self, msg): 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) jabber_recipient = "%s@%s" % (room, options.conference_domain)
outgoing = self.jabber.make_message( outgoing = self.jabber.make_message(
mto = jabber_recipient, mto = jabber_recipient,