Ver código fonte

Add an early return when handling no-op presence updates. (#14855)

This stops us from incrementing the presence stream position for no-op updates.
tags/v1.76.0rc1
Erik Johnston 1 ano atrás
committed by GitHub
pai
commit
4db3331bb9
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
2 arquivos alterados com 6 adições e 0 exclusões
  1. +1
    -0
      changelog.d/14855.misc
  2. +5
    -0
      synapse/handlers/presence.py

+ 1
- 0
changelog.d/14855.misc Ver arquivo

@@ -0,0 +1 @@
Add an early return when handling no-op presence updates.

+ 5
- 0
synapse/handlers/presence.py Ver arquivo

@@ -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,


Carregando…
Cancelar
Salvar