mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 09:13:09 -06:00
delete properly
This commit is contained in:
parent
5b7468263e
commit
8f5eb0c904
|
|
@ -153,10 +153,11 @@ func (r *Joiner) performJoinRoomByID(
|
||||||
) (string, gomatrixserverlib.ServerName, error) {
|
) (string, gomatrixserverlib.ServerName, error) {
|
||||||
// The original client request ?server_name=... may include this HS so filter that out so we
|
// The original client request ?server_name=... may include this HS so filter that out so we
|
||||||
// don't attempt to make_join with ourselves
|
// don't attempt to make_join with ourselves
|
||||||
for i, srv := range req.ServerNames {
|
for i := 0; i < len(req.ServerNames); i++ {
|
||||||
if srv == r.Cfg.Matrix.ServerName {
|
if req.ServerNames[i] == r.Cfg.Matrix.ServerName {
|
||||||
// delete this entry
|
// delete this entry
|
||||||
req.ServerNames = append(req.ServerNames[:i], req.ServerNames[i+1:]...)
|
req.ServerNames = append(req.ServerNames[:i], req.ServerNames[i+1:]...)
|
||||||
|
i--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue