settings: Remove private_message_policy setting.

Removes `private_message_policy` field from both the API and
the backend.
This commit is contained in:
Vector73
2024-07-08 22:30:19 +05:30
committed by Tim Abbott
parent 6098c2cebe
commit 121043b6f2
9 changed files with 19 additions and 42 deletions

View File

@@ -157,11 +157,6 @@ class MoveMessagesBetweenStreamsPolicyEnum(IntEnum):
NOBODY = 6
class PrivateMessagePolicyEnum(IntEnum):
UNLIMITED = 1
DISABLED = 2
class WildcardMentionPolicyEnum(IntEnum):
EVERYONE = 1
MEMBERS = 2
@@ -364,11 +359,6 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
user_group_edit_policy = models.PositiveSmallIntegerField(default=CommonPolicyEnum.MEMBERS_ONLY)
private_message_policy = models.PositiveSmallIntegerField(
default=PrivateMessagePolicyEnum.UNLIMITED
)
PRIVATE_MESSAGE_POLICY_TYPES = [field.value for field in PrivateMessagePolicyEnum]
# Global policy for who is allowed to use wildcard mentions in
# streams with a large number of subscribers. Anyone can use
# wildcard mentions in small streams regardless of this setting.
@@ -687,7 +677,6 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
move_messages_between_streams_policy=int,
name=str,
name_changes_disabled=bool,
private_message_policy=int,
push_notifications_enabled=bool,
require_unique_names=bool,
send_welcome_emails=bool,