From 8670cce8e91732cea95ad081ed806020640001e7 Mon Sep 17 00:00:00 2001 From: rht Date: Thu, 6 Aug 2020 23:33:54 -0400 Subject: [PATCH] Matrix bridge: Change the condition of not_from_zulip_bot. --- zulip/integrations/bridge_with_matrix/matrix_bridge.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zulip/integrations/bridge_with_matrix/matrix_bridge.py b/zulip/integrations/bridge_with_matrix/matrix_bridge.py index ba7779d..0b140c7 100644 --- a/zulip/integrations/bridge_with_matrix/matrix_bridge.py +++ b/zulip/integrations/bridge_with_matrix/matrix_bridge.py @@ -75,10 +75,7 @@ def matrix_to_zulip( zulip_bot_user = ('@%s:matrix.org' % matrix_config['username']) # We do this to identify the messages generated from Zulip -> Matrix # and we make sure we don't forward it again to the Zulip stream. - not_from_zulip_bot = ( - 'body' not in event['content'] - or event['sender'] != zulip_bot_user - ) + not_from_zulip_bot = event['sender'] != zulip_bot_user if not_from_zulip_bot and content: try: