Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Reenable presence
Browse files Browse the repository at this point in the history
  • Loading branch information
hera committed May 3, 2017
1 parent 05e62e0 commit 0ebd376
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion synapse/handlers/initial_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ def _room_initial_sync_joined(self, user_id, room_id, pagin_config,

@defer.inlineCallbacks
def get_presence():
defer.returnValue([])
states = yield presence_handler.get_states(
[m.user_id for m in room_members],
as_event=True,
Expand Down
4 changes: 0 additions & 4 deletions synapse/handlers/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ def bump_presence_active_time(self, user):
"""We've seen the user do something that indicates they're interacting
with the app.
"""
return
user_id = user.to_string()

bump_active_time_counter.inc()
Expand Down Expand Up @@ -402,7 +401,6 @@ def user_syncing(self, user_id, affect_presence=True):
Useful for streams that are not associated with an actual
client that is being used by a user.
"""
affect_presence = False
if affect_presence:
curr_sync = self.user_to_num_current_syncs.get(user_id, 0)
self.user_to_num_current_syncs[user_id] = curr_sync + 1
Expand Down Expand Up @@ -464,8 +462,6 @@ def update_external_syncs(self, process_id, syncing_user_ids):
syncing_user_ids(set(str)): The set of user_ids that are
currently syncing on that server.
"""
return

# Grab the previous list of user_ids that were syncing on that process
prev_syncing_user_ids = (
self.external_process_to_current_syncs.get(process_id, set())
Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def generate_sync_result(self, sync_config, since_token=None, full_state=False):
since_token is None and
sync_config.filter_collection.blocks_all_presence()
)
if False or not block_all_presence_data:
if not block_all_presence_data:
yield self._generate_sync_entry_for_presence(
sync_result_builder, newly_joined_rooms, newly_joined_users
)
Expand Down

0 comments on commit 0ebd376

Please sign in to comment.