mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Don't try to talk to ourselves when finding missing events
This commit is contained in:
parent
e53dcb25a9
commit
3f82bceb70
1 changed files with 5 additions and 2 deletions
|
@ -173,12 +173,15 @@ func (r *Inputer) processRoomEvent(
|
||||||
for _, server := range serverRes.ServerNames {
|
for _, server := range serverRes.ServerNames {
|
||||||
servers[server] = struct{}{}
|
servers[server] = struct{}{}
|
||||||
}
|
}
|
||||||
|
// Don't try to talk to ourselves.
|
||||||
|
delete(servers, r.Cfg.Matrix.ServerName)
|
||||||
|
// Now build up the list of servers.
|
||||||
serverRes.ServerNames = serverRes.ServerNames[:0]
|
serverRes.ServerNames = serverRes.ServerNames[:0]
|
||||||
if input.Origin != "" {
|
if input.Origin != "" && input.Origin != r.Cfg.Matrix.ServerName {
|
||||||
serverRes.ServerNames = append(serverRes.ServerNames, input.Origin)
|
serverRes.ServerNames = append(serverRes.ServerNames, input.Origin)
|
||||||
delete(servers, input.Origin)
|
delete(servers, input.Origin)
|
||||||
}
|
}
|
||||||
if senderDomain != input.Origin {
|
if senderDomain != input.Origin && senderDomain != r.Cfg.Matrix.ServerName {
|
||||||
serverRes.ServerNames = append(serverRes.ServerNames, senderDomain)
|
serverRes.ServerNames = append(serverRes.ServerNames, senderDomain)
|
||||||
delete(servers, senderDomain)
|
delete(servers, senderDomain)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue