From b935da6c33a94375329bf17a0abb13f74a24c8b2 Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Tue, 31 Jan 2023 12:32:36 -0700 Subject: [PATCH] Use new gmsl RelayEvents type for send_relay request body --- relayapi/routing/sendrelay.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/relayapi/routing/sendrelay.go b/relayapi/routing/sendrelay.go index 85a722c8a..ce744cb49 100644 --- a/relayapi/routing/sendrelay.go +++ b/relayapi/routing/sendrelay.go @@ -36,11 +36,7 @@ func SendTransactionToRelay( ) util.JSONResponse { logrus.Infof("Processing send_relay for %s", userID.Raw()) - var txnEvents struct { - PDUs []json.RawMessage `json:"pdus"` - EDUs []gomatrixserverlib.EDU `json:"edus"` - } - + var txnEvents gomatrixserverlib.RelayEvents if err := json.Unmarshal(fedReq.Content(), &txnEvents); err != nil { logrus.Info("The request body could not be decoded into valid JSON." + err.Error()) return util.JSONResponse{