mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
Tweaks
This commit is contained in:
parent
a12a36078a
commit
b6907f0d85
|
|
@ -110,7 +110,6 @@ func (s *OutputRoomEventConsumer) onMessage(msg *sarama.ConsumerMessage) error {
|
||||||
// processMessage updates the list of currently joined hosts in the room
|
// 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.
|
// and then sends the event to the hosts that were joined before the event.
|
||||||
func (s *OutputRoomEventConsumer) processMessage(ore api.OutputNewRoomEvent) error {
|
func (s *OutputRoomEventConsumer) processMessage(ore api.OutputNewRoomEvent) error {
|
||||||
|
|
||||||
addsJoinedHosts, err := joinedHostsFromEvents(gomatrixserverlib.UnwrapEventHeaders(ore.AddsState()))
|
addsJoinedHosts, err := joinedHostsFromEvents(gomatrixserverlib.UnwrapEventHeaders(ore.AddsState()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ const (
|
||||||
// KindBackfill event extend the contiguous graph going backwards.
|
// KindBackfill event extend the contiguous graph going backwards.
|
||||||
// They always have state.
|
// They always have state.
|
||||||
KindBackfill = 3
|
KindBackfill = 3
|
||||||
// KindRewrite events are used to rewrite the head of the graph.
|
// KindRewrite events are used when rewriting the head of the room
|
||||||
// They are used in state, forward extremity and membership updates
|
// graph with entirely new state. The output events generated will
|
||||||
// but are not sent as output events.
|
// be state events rather than timeline events.
|
||||||
KindRewrite = 4
|
KindRewrite = 4
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ func (r *Inputer) updateLatestEvents(
|
||||||
event gomatrixserverlib.Event,
|
event gomatrixserverlib.Event,
|
||||||
sendAsServer string,
|
sendAsServer string,
|
||||||
transactionID *api.TransactionID,
|
transactionID *api.TransactionID,
|
||||||
sendOutput bool,
|
isHistorical bool,
|
||||||
) (err error) {
|
) (err error) {
|
||||||
updater, err := r.DB.GetLatestEventsForUpdate(ctx, *roomInfo)
|
updater, err := r.DB.GetLatestEventsForUpdate(ctx, *roomInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -72,7 +72,7 @@ func (r *Inputer) updateLatestEvents(
|
||||||
event: event,
|
event: event,
|
||||||
sendAsServer: sendAsServer,
|
sendAsServer: sendAsServer,
|
||||||
transactionID: transactionID,
|
transactionID: transactionID,
|
||||||
isHistorical: sendOutput,
|
isHistorical: isHistorical,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = u.doUpdateLatestEvents(); err != nil {
|
if err = u.doUpdateLatestEvents(); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue