Switch bridge event processor to handle events in order

This commit is contained in:
Tulir Asokan 2022-05-30 15:08:27 +03:00
commit 7eec0bd4d3
2 changed files with 2 additions and 2 deletions

View file

@ -318,7 +318,7 @@ func (br *Bridge) init() {
br.Log.Debugln("Initializing Matrix event processor")
br.EventProcessor = appservice.NewEventProcessor(br.AS)
br.EventProcessor.ExecMode = appservice.AsyncLoop
br.EventProcessor.ExecMode = appservice.Sync
br.Log.Debugln("Initializing Matrix event handler")
br.MatrixHandler = NewMatrixHandler(br)

View file

@ -430,7 +430,7 @@ func (mx *MatrixHandler) HandleMessage(evt *event.Event) {
content.Body = strings.TrimLeft(content.Body[len(commandPrefix):], " ")
}
if hasCommandPrefix || evt.RoomID == user.GetManagementRoomID() {
mx.bridge.CommandProcessor.Handle(evt.RoomID, evt.ID, user, content.Body, content.GetReplyTo())
go mx.bridge.CommandProcessor.Handle(evt.RoomID, evt.ID, user, content.Body, content.GetReplyTo())
return
}
}