Fix panic when handling read receipt if user isn't connected
This commit is contained in:
parent
cd5e83478a
commit
9b498149be
1 changed files with 4 additions and 0 deletions
|
@ -1983,6 +1983,10 @@ func (portal *Portal) HandleMatrixReadReceipt(brUser bridge.User, eventID id.Eve
|
|||
Time("receipt_ts", receipt.Timestamp).
|
||||
Str("action", "handle matrix read receipt").
|
||||
Logger()
|
||||
if user.Client == nil {
|
||||
log.Debug().Msg("User is not connected, ignoring read receipt")
|
||||
return
|
||||
}
|
||||
ctx := log.WithContext(context.TODO())
|
||||
log.Debug().Msg("Handling Matrix read receipt")
|
||||
targetMessage, err := portal.bridge.DB.Message.GetByMXID(ctx, eventID)
|
||||
|
|
Loading…
Reference in a new issue