mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Make built-in bots come from settings.py, and allow localserver-specific ones
(imported from commit e21933e37487314ac986147562817a19227e8960)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from diff_match_patch import diff_match_patch
|
||||
import platform
|
||||
import logging
|
||||
@@ -107,9 +109,10 @@ def highlight_html_differences(s1, s2):
|
||||
# We probably want more information here
|
||||
logging.getLogger('').error('HTML diff produced mal-formed HTML')
|
||||
|
||||
subject = "HTML diff failure on %s" % (platform.node(),)
|
||||
internal_send_message("error-bot@zulip.com", "stream",
|
||||
"errors", subject, "HTML diff produced malformed HTML")
|
||||
if settings.ERROR_BOT is not None:
|
||||
subject = "HTML diff failure on %s" % (platform.node(),)
|
||||
internal_send_message(settings.ERROR_BOT, "stream",
|
||||
"errors", subject, "HTML diff produced malformed HTML")
|
||||
return s2
|
||||
|
||||
return retval
|
||||
|
||||
Reference in New Issue
Block a user