From 116a1228ae1a2f2de77725cb1735da2aa05409e8 Mon Sep 17 00:00:00 2001 From: rht Date: Mon, 13 Aug 2018 07:56:15 +0100 Subject: [PATCH] bridge_with_irc: Disable echo on Zulip -> IRC. --- zulip/integrations/bridge_with_irc/irc_mirror_backend.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zulip/integrations/bridge_with_irc/irc_mirror_backend.py b/zulip/integrations/bridge_with_irc/irc_mirror_backend.py index 46b2b93..5e4c7cc 100644 --- a/zulip/integrations/bridge_with_irc/irc_mirror_backend.py +++ b/zulip/integrations/bridge_with_irc/irc_mirror_backend.py @@ -41,6 +41,9 @@ class IRCBot(irc.bot.SingleServerIRCBot): def forward_to_irc(msg): # type: (Dict[str, Any]) -> None + if msg["sender_email"] == self.zulip_client.email: + # Do not forward echo + return if msg["type"] == "stream": send = lambda x: c.privmsg(self.channel, x) else: