Strip hash marks from slack channels at send time

This commit is contained in:
Matthew Jones
2016-04-25 09:49:18 -04:00
parent 16744e6b78
commit 256487a963

View File

@@ -43,6 +43,8 @@ class SlackBackend(TowerBaseEmailBackend):
for m in messages: for m in messages:
try: try:
for r in m.recipients(): for r in m.recipients():
if r.startswith('#'):
r = r[1:]
self.connection.rtm_send_message(r, m.subject) self.connection.rtm_send_message(r, m.subject)
sent_messages += 1 sent_messages += 1
except Exception as e: except Exception as e: