From 88b45d5cd248794237baebbe4945ef708a7598de Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 11 Feb 2022 15:18:14 +0000 Subject: [PATCH] Drop `m.room.create` events in federation `/send` transaction (#2179) --- federationapi/routing/send.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index dd4fe13a..745e36de 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -258,6 +258,9 @@ func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.Res util.GetLogger(ctx).WithError(err).Debugf("Transaction: Failed to parse event JSON of event %s", string(pdu)) continue } + if event.Type() == gomatrixserverlib.MRoomCreate && event.StateKeyEquals("") { + continue + } if api.IsServerBannedFromRoom(ctx, t.rsAPI, event.RoomID(), t.Origin) { results[event.EventID()] = gomatrixserverlib.PDUResult{ Error: "Forbidden by server ACLs",