mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
notification bot: Add constant for STREAM_EVENTS_NOTIFICATION_TOPIC.
This commit is contained in:
@@ -3564,7 +3564,7 @@ def do_rename_stream(stream: Stream,
|
|||||||
stream.realm,
|
stream.realm,
|
||||||
sender,
|
sender,
|
||||||
stream,
|
stream,
|
||||||
_('stream events'),
|
Realm.STREAM_EVENTS_NOTIFICATION_TOPIC,
|
||||||
_('@_**%(user_name)s|%(user_id)d** renamed stream **%(old_stream_name)s** to '
|
_('@_**%(user_name)s|%(user_id)d** renamed stream **%(old_stream_name)s** to '
|
||||||
'**%(new_stream_name)s**.') % {
|
'**%(new_stream_name)s**.') % {
|
||||||
'user_name': user_profile.full_name,
|
'user_name': user_profile.full_name,
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ class Realm(models.Model):
|
|||||||
|
|
||||||
DEFAULT_NOTIFICATION_STREAM_NAME = u'general'
|
DEFAULT_NOTIFICATION_STREAM_NAME = u'general'
|
||||||
INITIAL_PRIVATE_STREAM_NAME = u'core team'
|
INITIAL_PRIVATE_STREAM_NAME = u'core team'
|
||||||
|
STREAM_EVENTS_NOTIFICATION_TOPIC = _('stream events')
|
||||||
notifications_stream = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE) # type: Optional[Stream]
|
notifications_stream = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE) # type: Optional[Stream]
|
||||||
signup_notifications_stream = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE) # type: Optional[Stream]
|
signup_notifications_stream = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE) # type: Optional[Stream]
|
||||||
|
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ def add_subscriptions_backend(
|
|||||||
realm=user_profile.realm,
|
realm=user_profile.realm,
|
||||||
sender=sender,
|
sender=sender,
|
||||||
stream=stream,
|
stream=stream,
|
||||||
topic=_('stream events'),
|
topic=Realm.STREAM_EVENTS_NOTIFICATION_TOPIC,
|
||||||
content=_('Stream created by @_**%(user_name)s|%(user_id)d**.') % {
|
content=_('Stream created by @_**%(user_name)s|%(user_id)d**.') % {
|
||||||
'user_name': user_profile.full_name,
|
'user_name': user_profile.full_name,
|
||||||
'user_id': user_profile.id}
|
'user_id': user_profile.id}
|
||||||
|
|||||||
Reference in New Issue
Block a user