From c5d28a78a25df260dea96a3ffaae3abde48cf613 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Mon, 13 May 2013 12:10:14 -0400 Subject: [PATCH] Don't send offline email notifications to bots (imported from commit f7547f49580bf905c05a4fa2aa064fb82b7b4036) --- zephyr/tornado_callbacks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zephyr/tornado_callbacks.py b/zephyr/tornado_callbacks.py index 0eb4f93d32..389b0bbbda 100644 --- a/zephyr/tornado_callbacks.py +++ b/zephyr/tornado_callbacks.py @@ -276,7 +276,8 @@ def process_new_message(data): user_profile = get_user_profile_by_id(user_profile_id) - if user_profile.enable_offline_email_notifications: + if user_profile.enable_offline_email_notifications and \ + not user_profile.is_bot: event = {"user_profile_id": user_profile_id, "message_id": message.id, "timestamp": time.time()}