stream: Add do_change_can_remove_subscribers_group and field to objects.

This commit adds do_change_can_remove_subscriber_group function for
changing can_remove_subscribers_group field of a stream. We also add
can_remove_subscribers_group_id field to stream and subscription
objects.

This function will be helpful for writing tests in next commit.
We would add API and UI support to change this setting in further
commits.
This commit is contained in:
Sahil Batra
2022-06-27 22:09:33 +05:30
committed by Tim Abbott
parent 86c2f6881e
commit b9248c75f4
10 changed files with 102 additions and 1 deletions

View File

@@ -177,6 +177,7 @@ class RawStreamDict(TypedDict):
are needed to encode the stream for the API.
"""
can_remove_subscribers_group_id: int
date_created: datetime.datetime
description: str
email_token: str
@@ -216,6 +217,7 @@ class SubscriptionStreamDict(TypedDict):
"""
audible_notifications: Optional[bool]
can_remove_subscribers_group_id: int
color: str
date_created: int
description: str
@@ -242,6 +244,7 @@ class SubscriptionStreamDict(TypedDict):
class NeverSubscribedStreamDict(TypedDict):
can_remove_subscribers_group_id: int
date_created: int
description: str
first_message_id: Optional[int]
@@ -264,6 +267,7 @@ class APIStreamDict(TypedDict):
with few exceptions and possible additional fields.
"""
can_remove_subscribers_group_id: int
date_created: int
description: str
first_message_id: Optional[int]