mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Don't panic if the roomInfo isn't known yet
This commit is contained in:
parent
1085c06d3c
commit
14c8fa3deb
|
|
@ -128,7 +128,7 @@ func (d *Database) RoomInfo(ctx context.Context, roomID string) (*types.RoomInfo
|
|||
return &roomInfo, nil
|
||||
}
|
||||
roomInfo, err := d.RoomsTable.SelectRoomInfo(ctx, roomID)
|
||||
if err == nil {
|
||||
if err == nil && roomInfo != nil {
|
||||
d.Cache.StoreRoomServerRoomID(roomInfo.RoomNID, roomID)
|
||||
d.Cache.StoreRoomInfo(roomID, *roomInfo)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue