codebase: Truncate subjects to 60 characters

(imported from commit db5ba1a8af80f2060aec03b3ba1d9e0f3e75c0b3)
This commit is contained in:
Zev Benjamin 2013-10-08 18:54:03 -04:00
parent b26c47ee5e
commit dac447d14e

View file

@ -220,6 +220,9 @@ def handle_event(event):
logging.info("Unknown event type %s, ignoring!" % (event_type,)) logging.info("Unknown event type %s, ignoring!" % (event_type,))
if subject and content: if subject and content:
if len(subject) > 60:
subject = subject[:57].rstrip() + '...'
res = client.send_message({"type": "stream", res = client.send_message({"type": "stream",
"to": stream, "to": stream,
"subject": subject, "subject": subject,