Skip to content

Commit

Permalink
Also don't send null back when the target room isn't a space room
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Mar 1, 2022
1 parent af610df commit 8dfc958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup/mscs/msc2946/msc2946.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ func (w *walker) childReferences(roomID string) ([]gomatrixserverlib.MSC2946Stri
// escape the `.`s so gjson doesn't think it's nested
roomType := gjson.GetBytes(res.StateEvents[createTuple].Content(), strings.ReplaceAll(ConstCreateEventContentKey, ".", `\.`)).Str
if roomType != ConstCreateEventContentValueSpace {
return nil, nil
return []gomatrixserverlib.MSC2946StrippedEvent{}, nil
}
}
delete(res.StateEvents, createTuple)
Expand Down

0 comments on commit 8dfc958

Please sign in to comment.