mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Add an early return when handling no-op presence updates. (#14855)
This stops us from incrementing the presence stream position for no-op updates.
This commit is contained in:
parent
a302d3ecf7
commit
4db3331bb9
1
changelog.d/14855.misc
Normal file
1
changelog.d/14855.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Add an early return when handling no-op presence updates.
|
@ -2155,6 +2155,11 @@ class PresenceFederationQueue:
|
|||||||
# This should only be called on a presence writer.
|
# This should only be called on a presence writer.
|
||||||
assert self._presence_writer
|
assert self._presence_writer
|
||||||
|
|
||||||
|
if not states or not destinations:
|
||||||
|
# Ignore calls which either don't have any new states or don't need
|
||||||
|
# to be sent anywhere.
|
||||||
|
return
|
||||||
|
|
||||||
if self._federation:
|
if self._federation:
|
||||||
self._federation.send_presence_to_destinations(
|
self._federation.send_presence_to_destinations(
|
||||||
states=states,
|
states=states,
|
||||||
|
Loading…
Reference in New Issue
Block a user