mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
settings: Rename notifications_stream to new_stream_announce..._stream.
This commit renames the realm-level setting 'notifications_stream' to 'new_stream_announcements_stream'. The new name reflects better what the setting does.
This commit is contained in:
committed by
Tim Abbott
parent
0c83bca81e
commit
ab453fbe20
@@ -335,7 +335,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
|
||||
DEFAULT_NOTIFICATION_STREAM_NAME = "general"
|
||||
INITIAL_PRIVATE_STREAM_NAME = "core team"
|
||||
STREAM_EVENTS_NOTIFICATION_TOPIC_NAME = gettext_lazy("stream events")
|
||||
notifications_stream = models.ForeignKey(
|
||||
new_stream_announcements_stream = models.ForeignKey(
|
||||
"Stream",
|
||||
related_name="+",
|
||||
null=True,
|
||||
@@ -784,9 +784,12 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
|
||||
def get_bot_domain(self) -> str:
|
||||
return get_fake_email_domain(self.host)
|
||||
|
||||
def get_notifications_stream(self) -> Optional["Stream"]:
|
||||
if self.notifications_stream is not None and not self.notifications_stream.deactivated:
|
||||
return self.notifications_stream
|
||||
def get_new_stream_announcements_stream(self) -> Optional["Stream"]:
|
||||
if (
|
||||
self.new_stream_announcements_stream is not None
|
||||
and not self.new_stream_announcements_stream.deactivated
|
||||
):
|
||||
return self.new_stream_announcements_stream
|
||||
return None
|
||||
|
||||
def get_signup_notifications_stream(self) -> Optional["Stream"]:
|
||||
|
||||
Reference in New Issue
Block a user