mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-29 15:39:00 +03:00
Merge pull request #2110 from matrix-org/rav/fix_reject_persistence
When we do an invite rejection, save the signed leave event to the db
This commit is contained in:
commit
54a59adc7c
1 changed files with 4 additions and 4 deletions
|
@ -1101,15 +1101,15 @@ class FederationHandler(BaseHandler):
|
||||||
user_id,
|
user_id,
|
||||||
"leave"
|
"leave"
|
||||||
)
|
)
|
||||||
signed_event = self._sign_event(event)
|
event = self._sign_event(event)
|
||||||
except SynapseError:
|
except SynapseError:
|
||||||
raise
|
raise
|
||||||
except CodeMessageException as e:
|
except CodeMessageException as e:
|
||||||
logger.warn("Failed to reject invite: %s", e)
|
logger.warn("Failed to reject invite: %s", e)
|
||||||
raise SynapseError(500, "Failed to reject invite")
|
raise SynapseError(500, "Failed to reject invite")
|
||||||
|
|
||||||
# Try the host we successfully got a response to /make_join/
|
# Try the host that we succesfully called /make_leave/ on first for
|
||||||
# request first.
|
# the /send_leave/ request.
|
||||||
try:
|
try:
|
||||||
target_hosts.remove(origin)
|
target_hosts.remove(origin)
|
||||||
target_hosts.insert(0, origin)
|
target_hosts.insert(0, origin)
|
||||||
|
@ -1119,7 +1119,7 @@ class FederationHandler(BaseHandler):
|
||||||
try:
|
try:
|
||||||
yield self.replication_layer.send_leave(
|
yield self.replication_layer.send_leave(
|
||||||
target_hosts,
|
target_hosts,
|
||||||
signed_event
|
event
|
||||||
)
|
)
|
||||||
except SynapseError:
|
except SynapseError:
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in a new issue