feedbact-bot: send feedback messages sent by non-MIT users too.

(imported from commit 00eb1f99af751665d036d25ea31da3dbfdf327a4)
This commit is contained in:
Tim Abbott 2012-10-26 10:42:31 -04:00
parent cae78fa917
commit e8b54fc138

View file

@ -24,13 +24,12 @@ client = api.common.HumbugAPI(email="feedback@humbughq.com",
site=options.site)
def forward_message(message):
if message["sender_email"].endswith("@mit.edu"):
forwarded_message = {
"type": "stream",
"stream": "support",
"subject": "feedback from %s" % message["sender_email"],
"content": message["content"],
}
client.send_message(forwarded_message)
forwarded_message = {
"type": "stream",
"stream": "support",
"subject": "feedback from %s" % message["sender_email"],
"content": message["content"],
}
client.send_message(forwarded_message)
client.call_on_each_message(forward_message)