mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Don't take copies again
This commit is contained in:
parent
ade8352045
commit
4ff46624ff
|
|
@ -177,7 +177,7 @@ func (s *OutputRoomEventConsumer) processMessage(ore api.OutputNewRoomEvent) err
|
|||
|
||||
// Send the event.
|
||||
return s.queues.SendEvent(
|
||||
ore.Event, gomatrixserverlib.ServerName(ore.SendAsServer), joinedHostsAtEvent,
|
||||
&ore.Event, gomatrixserverlib.ServerName(ore.SendAsServer), joinedHostsAtEvent,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +204,7 @@ func (s *OutputRoomEventConsumer) processInvite(oie api.OutputNewInviteEvent) er
|
|||
}
|
||||
|
||||
// Send the event.
|
||||
return s.queues.SendInvite(inviteReq)
|
||||
return s.queues.SendInvite(&inviteReq)
|
||||
}
|
||||
|
||||
// joinedHostsAtEvent works out a list of matrix servers that were joined to
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ func NewOutgoingQueues(
|
|||
|
||||
// SendEvent sends an event to the destinations
|
||||
func (oqs *OutgoingQueues) SendEvent(
|
||||
ev gomatrixserverlib.HeaderedEvent, origin gomatrixserverlib.ServerName,
|
||||
ev *gomatrixserverlib.HeaderedEvent, origin gomatrixserverlib.ServerName,
|
||||
destinations []gomatrixserverlib.ServerName,
|
||||
) error {
|
||||
if origin != oqs.origin {
|
||||
|
|
@ -84,7 +84,7 @@ func (oqs *OutgoingQueues) SendEvent(
|
|||
oqs.queuesMutex.Unlock()
|
||||
}
|
||||
|
||||
go oq.sendEvent(&ev)
|
||||
go oq.sendEvent(ev)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
@ -92,7 +92,7 @@ func (oqs *OutgoingQueues) SendEvent(
|
|||
|
||||
// SendEvent sends an event to the destinations
|
||||
func (oqs *OutgoingQueues) SendInvite(
|
||||
inviteReq gomatrixserverlib.InviteV2Request,
|
||||
inviteReq *gomatrixserverlib.InviteV2Request,
|
||||
) error {
|
||||
ev := inviteReq.Event()
|
||||
stateKey := ev.StateKey()
|
||||
|
|
@ -131,7 +131,7 @@ func (oqs *OutgoingQueues) SendInvite(
|
|||
oqs.queuesMutex.Unlock()
|
||||
}
|
||||
|
||||
go oq.sendInvite(&inviteReq)
|
||||
go oq.sendInvite(inviteReq)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue