aboutsummaryrefslogtreecommitdiff
path: root/federationapi
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-02-11 15:18:14 +0000
committerGitHub <noreply@github.com>2022-02-11 15:18:14 +0000
commit88b45d5cd248794237baebbe4945ef708a7598de (patch)
treeb20982da322c17d38225bf73afaa4835c9088dd1 /federationapi
parent4e75ab9930842e34314b0af89f60149871f6e6f2 (diff)
Drop `m.room.create` events in federation `/send` transaction (#2179)
Diffstat (limited to 'federationapi')
-rw-r--r--federationapi/routing/send.go3
1 files changed, 3 insertions, 0 deletions
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",