refactor: Pass realm to bulk_remove_subscriptions.

We made a very similar change to bulk_add_subscriptions
earlier in the year.
This commit is contained in:
Steve Howell
2021-12-24 13:29:40 +00:00
committed by Tim Abbott
parent ebbd5f168b
commit 01ebb2c85f
8 changed files with 35 additions and 23 deletions

View File

@@ -1076,8 +1076,9 @@ Output:
return stream
def unsubscribe(self, user_profile: UserProfile, stream_name: str) -> None:
realm = user_profile.realm
stream = get_stream(stream_name, user_profile.realm)
bulk_remove_subscriptions([user_profile], [stream], acting_user=None)
bulk_remove_subscriptions(realm, [user_profile], [stream], acting_user=None)
# Subscribe to a stream by making an API request
def common_subscribe_to_streams(