Fix issue with sending presence events to invalid servers

This commit is contained in:
Till Faelligen 2022-12-06 13:27:33 +01:00
parent 7583478305
commit ded43e0f2d
No known key found for this signature in database
GPG key ID: ACCDC9606D472758

View file

@ -232,7 +232,7 @@ func (s *OutputRoomEventConsumer) processMessage(ore api.OutputNewRoomEvent, rew
} }
func (s *OutputRoomEventConsumer) sendPresence(roomID string, addedJoined []types.JoinedHost) { func (s *OutputRoomEventConsumer) sendPresence(roomID string, addedJoined []types.JoinedHost) {
joined := make([]gomatrixserverlib.ServerName, len(addedJoined)) joined := make([]gomatrixserverlib.ServerName, 0, len(addedJoined))
for _, added := range addedJoined { for _, added := range addedJoined {
joined = append(joined, added.ServerName) joined = append(joined, added.ServerName)
} }