Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Don't warn on activity in a non-portal room
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Nov 10, 2023
1 parent 46d5b4e commit b28a2c3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1771,12 +1771,13 @@ func (br *SignalBridge) GetPortalByMXID(mxid id.RoomID) *Portal {
br.portalsLock.Lock()
defer br.portalsLock.Unlock()

portal, ok := br.portalsByMXID[mxid]
if !ok {
return br.loadPortal(br.DB.Portal.GetByMXID(mxid), nil)
if portal, ok := br.portalsByMXID[mxid]; ok {
return portal
} else if dbPortal := br.DB.Portal.GetByMXID(mxid); dbPortal != nil {
return br.loadPortal(dbPortal, nil)
} else {
return nil
}

return portal
}

func (br *SignalBridge) GetPortalByChatID(key database.PortalKey) *Portal {
Expand Down

0 comments on commit b28a2c3

Please sign in to comment.