Add an early return when handling no-op presence updates. (#14855)
This stops us from incrementing the presence stream position for no-op updates.pull/14852/head
parent
a302d3ecf7
commit
4db3331bb9
|
@ -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.
|
||||
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:
|
||||
self._federation.send_presence_to_destinations(
|
||||
states=states,
|
||||
|
|
Loading…
Reference in New Issue