From 810b219f8c89aec4e9bd8338f21a2bc2d0c69d3c Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Fri, 28 Feb 2014 15:15:43 -0500 Subject: [PATCH] jabber_mirror: Only mirror messages from streams that end in '/xmpp' (imported from commit 5213d40063361ffcf073772580ac0f699228cb3f) --- bots/jabber_mirror.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bots/jabber_mirror.py b/bots/jabber_mirror.py index b1fa75e..d493afe 100755 --- a/bots/jabber_mirror.py +++ b/bots/jabber_mirror.py @@ -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,