mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08: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) {
|
||||
// The original client request ?server_name=... may include this HS so filter that out so we
|
||||
// don't attempt to make_join with ourselves
|
||||
for i, srv := range req.ServerNames {
|
||||
if srv == r.Cfg.Matrix.ServerName {
|
||||
for i := 0; i < len(req.ServerNames); i++ {
|
||||
if req.ServerNames[i] == r.Cfg.Matrix.ServerName {
|
||||
// delete this entry
|
||||
req.ServerNames = append(req.ServerNames[:i], req.ServerNames[i+1:]...)
|
||||
i--
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue