Remove TransactionID from struct
This commit is contained in:
parent
53c474f93e
commit
8bbd9406f8
|
@ -78,7 +78,6 @@ func (r *Inputer) updateLatestEvents(
|
||||||
stateAtEvent: stateAtEvent,
|
stateAtEvent: stateAtEvent,
|
||||||
event: event,
|
event: event,
|
||||||
sendAsServer: sendAsServer,
|
sendAsServer: sendAsServer,
|
||||||
transactionID: transactionID,
|
|
||||||
rewritesState: rewritesState,
|
rewritesState: rewritesState,
|
||||||
historyVisibility: historyVisibility,
|
historyVisibility: historyVisibility,
|
||||||
}
|
}
|
||||||
|
@ -89,7 +88,7 @@ func (r *Inputer) updateLatestEvents(
|
||||||
return fmt.Errorf("u.doUpdateLatestEvents: %w", err)
|
return fmt.Errorf("u.doUpdateLatestEvents: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
update, err := u.makeOutputNewRoomEvent()
|
update, err := u.makeOutputNewRoomEvent(transactionID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("u.makeOutputNewRoomEvent: %w", err)
|
return fmt.Errorf("u.makeOutputNewRoomEvent: %w", err)
|
||||||
}
|
}
|
||||||
|
@ -128,7 +127,6 @@ type latestEventsUpdater struct {
|
||||||
roomInfo *types.RoomInfo
|
roomInfo *types.RoomInfo
|
||||||
stateAtEvent types.StateAtEvent
|
stateAtEvent types.StateAtEvent
|
||||||
event gomatrixserverlib.PDU
|
event gomatrixserverlib.PDU
|
||||||
transactionID *api.TransactionID
|
|
||||||
rewritesState bool
|
rewritesState bool
|
||||||
// Which server to send this event as.
|
// Which server to send this event as.
|
||||||
sendAsServer string
|
sendAsServer string
|
||||||
|
@ -390,7 +388,7 @@ func (u *latestEventsUpdater) calculateLatest(
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *latestEventsUpdater) makeOutputNewRoomEvent() (*api.OutputEvent, error) {
|
func (u *latestEventsUpdater) makeOutputNewRoomEvent(transactionID *api.TransactionID) (*api.OutputEvent, error) {
|
||||||
latestEventIDs := make([]string, len(u.latest))
|
latestEventIDs := make([]string, len(u.latest))
|
||||||
for i := range u.latest {
|
for i := range u.latest {
|
||||||
latestEventIDs[i] = u.latest[i].EventID
|
latestEventIDs[i] = u.latest[i].EventID
|
||||||
|
@ -401,7 +399,7 @@ func (u *latestEventsUpdater) makeOutputNewRoomEvent() (*api.OutputEvent, error)
|
||||||
RewritesState: u.rewritesState,
|
RewritesState: u.rewritesState,
|
||||||
LastSentEventID: u.lastEventIDSent,
|
LastSentEventID: u.lastEventIDSent,
|
||||||
LatestEventIDs: latestEventIDs,
|
LatestEventIDs: latestEventIDs,
|
||||||
TransactionID: u.transactionID,
|
TransactionID: transactionID,
|
||||||
SendAsServer: u.sendAsServer,
|
SendAsServer: u.sendAsServer,
|
||||||
HistoryVisibility: u.historyVisibility,
|
HistoryVisibility: u.historyVisibility,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue