This commit is contained in:
Neil Alexander 2020-09-09 15:58:41 +01:00
parent a12a36078a
commit b6907f0d85
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 5 additions and 6 deletions

View file

@ -110,7 +110,6 @@ func (s *OutputRoomEventConsumer) onMessage(msg *sarama.ConsumerMessage) error {
// processMessage updates the list of currently joined hosts in the room
// and then sends the event to the hosts that were joined before the event.
func (s *OutputRoomEventConsumer) processMessage(ore api.OutputNewRoomEvent) error {
addsJoinedHosts, err := joinedHostsFromEvents(gomatrixserverlib.UnwrapEventHeaders(ore.AddsState()))
if err != nil {
return err

View file

@ -33,9 +33,9 @@ const (
// KindBackfill event extend the contiguous graph going backwards.
// They always have state.
KindBackfill = 3
// KindRewrite events are used to rewrite the head of the graph.
// They are used in state, forward extremity and membership updates
// but are not sent as output events.
// KindRewrite events are used when rewriting the head of the room
// graph with entirely new state. The output events generated will
// be state events rather than timeline events.
KindRewrite = 4
)

View file

@ -54,7 +54,7 @@ func (r *Inputer) updateLatestEvents(
event gomatrixserverlib.Event,
sendAsServer string,
transactionID *api.TransactionID,
sendOutput bool,
isHistorical bool,
) (err error) {
updater, err := r.DB.GetLatestEventsForUpdate(ctx, *roomInfo)
if err != nil {
@ -72,7 +72,7 @@ func (r *Inputer) updateLatestEvents(
event: event,
sendAsServer: sendAsServer,
transactionID: transactionID,
isHistorical: sendOutput,
isHistorical: isHistorical,
}
if err = u.doUpdateLatestEvents(); err != nil {