diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 365f63bd97..25ff074fc4 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -1497,11 +1497,8 @@ def do_update_pointer(user_profile, pointer, update_flags=False): flags=~UserMessage.flags.read) \ .update(flags=F('flags').bitor(UserMessage.flags.read)) - if settings.TORNADO_SERVER: - tornado_callbacks.send_notification(dict( - type = 'pointer_update', - user = user_profile.id, - new_pointer = pointer)) + event = dict(type='pointer', pointer=pointer) + send_event(event, [user_profile.id]) def do_update_message_flags(user_profile, operation, flag, messages, all): flagattr = getattr(UserMessage.flags, flag) diff --git a/zerver/tornado_callbacks.py b/zerver/tornado_callbacks.py index b62d7fedbc..58928d7f23 100644 --- a/zerver/tornado_callbacks.py +++ b/zerver/tornado_callbacks.py @@ -25,12 +25,6 @@ import datetime # after they are idle for 1 hour NOTIFY_AFTER_IDLE_HOURS = 1 -def update_pointer(user_profile_id, new_pointer): - event = dict(type='pointer', pointer=new_pointer) - for client in get_client_descriptors_for_user(user_profile_id): - if client.accepts_event(event): - client.add_event(event.copy()) - def build_offline_notification_event(user_profile_id, message_id): return {"user_profile_id": user_profile_id, "message_id": message_id, @@ -222,8 +216,6 @@ def process_notification(data): process_new_message(data) elif data['type'] == 'update_message': process_update_message(data) - elif data['type'] == 'pointer_update': - update_pointer(data['user'], data['new_pointer']) else: raise JsonableError('bad notification type ' + data['type'])