do_mark_stream_messages_as_read: Accept a Client object.

We also fix an incorrect Optional in the type annotations.
This commit is contained in:
Tim Abbott
2018-03-13 16:09:11 -07:00
parent 6e55342e21
commit c775be8ea4
3 changed files with 9 additions and 6 deletions

View File

@@ -2777,6 +2777,7 @@ def bulk_remove_subscriptions(users: Iterable[UserProfile],
notify_subscriptions_removed(user_profile, streams_by_user[user_profile.id])
event = {'type': 'mark_stream_messages_as_read',
'client_id': acting_client.id,
'user_profile_id': user_profile.id,
'stream_ids': [stream.id for stream in streams]}
queue_json_publish("deferred_work", event)
@@ -3578,7 +3579,8 @@ def do_mark_all_as_read(user_profile: UserProfile, client: Client) -> int:
return count
def do_mark_stream_messages_as_read(user_profile: UserProfile,
stream: Optional[Stream],
client: Client,
stream: Stream,
topic_name: Optional[str]=None) -> int:
log_statsd_event('mark_stream_as_read')