summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2022-11-16 15:25:35 +0000
committerGitHub <noreply@github.com>2022-11-16 15:25:35 +0000
commit618e4ab81b70e37bdb8e9224bd84fcfe4b15bdea (patch)
treeef808471ef6a1696a969a0a6191fe7fd95c9471e /synapse
parentRemove redundant types from comments. (#14412) (diff)
downloadsynapse-618e4ab81b70e37bdb8e9224bd84fcfe4b15bdea.tar.xz
Fix an invalid comparison of `UserPresenceState` to `str` (#14393)
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/presence.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index b7bc787636..cf08737d11 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -478,7 +478,7 @@ class WorkerPresenceHandler(BasePresenceHandler):
             return _NullContextManager()
 
         prev_state = await self.current_state_for_user(user_id)
-        if prev_state != PresenceState.BUSY:
+        if prev_state.state != PresenceState.BUSY:
             # We set state here but pass ignore_status_msg = True as we don't want to
             # cause the status message to be cleared.
             # Note that this causes last_active_ts to be incremented which is not