From a67d4611394199e005fe064339c53d5b141d1447 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Fri, 6 Sep 2013 15:05:14 -0400 Subject: [PATCH] Hoist joining of message content in alert_words processor (imported from commit 5025b7108839ddc04d6d9e575a9a288223526fe8) --- zerver/lib/bugdown/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/bugdown/__init__.py b/zerver/lib/bugdown/__init__.py index 4d9a5d1551..21b2b8b4f3 100644 --- a/zerver/lib/bugdown/__init__.py +++ b/zerver/lib/bugdown/__init__.py @@ -582,11 +582,11 @@ class AlertWordsNotificationProcessor(markdown.preprocessors.Preprocessor): # We check for a user's custom notifications here, as we want # to check for plaintext words that depend on the recipient. realm_words = alert_words.alert_words_in_realm(current_message.sender.realm) + content = '\n'.join(lines) for user, words in realm_words.iteritems(): for word in words: escaped = re.escape(word) match_re = re.compile(r'\b%s\b' % (escaped,)) - content = '\n'.join(lines) if re.search(match_re, content): current_message.user_ids_with_alert_words.add(user.id)