aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/sendevent.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-11-16 15:44:53 +0000
committerGitHub <noreply@github.com>2020-11-16 15:44:53 +0000
commit20a01bceb2869c810932eac217d96dc221953685 (patch)
tree639cd8656282ae231a46531f063d7d010320a582 /clientapi/routing/sendevent.go
parentd8b526b603683879c012972707cdce44fff3c802 (diff)
Pass pointers to events — reloaded (#1583)
* Pass events as pointers * Fix lint errors * Update gomatrixserverlib * Update gomatrixserverlib * Update to matrix-org/gomatrixserverlib#240
Diffstat (limited to 'clientapi/routing/sendevent.go')
-rw-r--r--clientapi/routing/sendevent.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/clientapi/routing/sendevent.go b/clientapi/routing/sendevent.go
index 1303663f..a4240cf3 100644
--- a/clientapi/routing/sendevent.go
+++ b/clientapi/routing/sendevent.go
@@ -93,7 +93,7 @@ func SendEvent(
if err := api.SendEvents(
req.Context(), rsAPI,
api.KindNew,
- []gomatrixserverlib.HeaderedEvent{
+ []*gomatrixserverlib.HeaderedEvent{
e.Headered(verRes.RoomVersion),
},
cfg.Matrix.ServerName,
@@ -189,7 +189,7 @@ func generateSendEvent(
// check to see if this user can perform this operation
stateEvents := make([]*gomatrixserverlib.Event, len(queryRes.StateEvents))
for i := range queryRes.StateEvents {
- stateEvents[i] = &queryRes.StateEvents[i].Event
+ stateEvents[i] = queryRes.StateEvents[i].Event
}
provider := gomatrixserverlib.NewAuthEvents(stateEvents)
if err = gomatrixserverlib.Allowed(e.Event, &provider); err != nil {
@@ -198,5 +198,5 @@ func generateSendEvent(
JSON: jsonerror.Forbidden(err.Error()), // TODO: Is this error string comprehensible to the client?
}
}
- return &e.Event, nil
+ return e.Event, nil
}