@@ -4171,11 +4171,13 @@ def get_available_notification_sounds() -> List[str]:
4171
4171
return sorted (available_notification_sounds )
4172
4172
4173
4173
4174
- def notify_subscriptions_removed (user_profile : UserProfile , streams : Iterable [Stream ]) -> None :
4174
+ def notify_subscriptions_removed (
4175
+ realm : Realm , user_profile : UserProfile , streams : Iterable [Stream ]
4176
+ ) -> None :
4175
4177
4176
4178
payload = [dict (name = stream .name , stream_id = stream .id ) for stream in streams ]
4177
4179
event = dict (type = "subscription" , op = "remove" , subscriptions = payload )
4178
- send_event (user_profile . realm , event , [user_profile .id ])
4180
+ send_event (realm , event , [user_profile .id ])
4179
4181
4180
4182
4181
4183
SubAndRemovedT = Tuple [List [Tuple [UserProfile , Stream ]], List [Tuple [UserProfile , Stream ]]]
@@ -4264,7 +4266,7 @@ def get_non_subscribed_subs() -> List[Tuple[UserProfile, Stream]]:
4264
4266
for user_profile in users :
4265
4267
if len (streams_by_user [user_profile .id ]) == 0 :
4266
4268
continue
4267
- notify_subscriptions_removed (user_profile , streams_by_user [user_profile .id ])
4269
+ notify_subscriptions_removed (our_realm , user_profile , streams_by_user [user_profile .id ])
4268
4270
4269
4271
event = {
4270
4272
"type" : "mark_stream_messages_as_read" ,
0 commit comments