Only call key update process functions if there are updates, don't send things to ourselves over federation

This commit is contained in:
Neil Alexander 2022-04-25 14:22:46 +01:00
parent 446819e4ac
commit aad81b7b4d
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 51 additions and 9 deletions

View file

@ -210,6 +210,7 @@ func (oqs *OutgoingQueues) SendEvent(
destmap[d] = struct{}{}
}
delete(destmap, oqs.origin)
delete(destmap, oqs.signing.ServerName)
// Check if any of the destinations are prohibited by server ACLs.
for destination := range destmap {
@ -275,6 +276,7 @@ func (oqs *OutgoingQueues) SendEDU(
destmap[d] = struct{}{}
}
delete(destmap, oqs.origin)
delete(destmap, oqs.signing.ServerName)
// There is absolutely no guarantee that the EDU will have a room_id
// field, as it is not required by the spec. However, if it *does*