diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-10-26 15:11:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 15:11:24 -0400 |
commit | 85e5f2dc252b866d67c8da2ddbfdb84974db1807 (patch) | |
tree | 938cdcc69d4c926e6a46361df894c087a73bbbfa /synapse/federation | |
parent | Convert simple_select_list and simple_select_list_txn to return lists of tupl... (diff) | |
download | synapse-85e5f2dc252b866d67c8da2ddbfdb84974db1807.tar.xz |
Add a new module API to update user presence state. (#16544)
This adds a module API which allows a module to update a user's presence state/status message. This is useful for controlling presence from an external system. To fully control presence from the module the presence.enabled config parameter gains a new state of "untracked" which disables internal tracking of presence changes via user actions, etc. Only updates from the module will be persisted and sent down sync properly).
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/federation_server.py | 2 | ||||
-rw-r--r-- | synapse/federation/sender/__init__.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index 6ac8d16095..3b27925517 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -1395,7 +1395,7 @@ class FederationHandlerRegistry: self._edu_type_to_instance[edu_type] = instance_names async def on_edu(self, edu_type: str, origin: str, content: dict) -> None: - if not self.config.server.use_presence and edu_type == EduTypes.PRESENCE: + if not self.config.server.track_presence and edu_type == EduTypes.PRESENCE: return # Check if we have a handler on this instance diff --git a/synapse/federation/sender/__init__.py b/synapse/federation/sender/__init__.py index 7b6b1da090..7980d1a322 100644 --- a/synapse/federation/sender/__init__.py +++ b/synapse/federation/sender/__init__.py @@ -844,7 +844,7 @@ class FederationSender(AbstractFederationSender): destinations (list[str]) """ - if not states or not self.hs.config.server.use_presence: + if not states or not self.hs.config.server.track_presence: # No-op if presence is disabled. return |