mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 02:03:40 -05:00
hicli/paginate: don't panic if room is deleted while fetching state
This commit is contained in:
parent
d51518a190
commit
5f50cf8e77
1 changed files with 2 additions and 0 deletions
|
@ -101,6 +101,8 @@ func (h *HiClient) processGetRoomState(ctx context.Context, roomID id.RoomID, fe
|
|||
room, err := h.DB.Room.Get(ctx, roomID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get room from database: %w", err)
|
||||
} else if room == nil {
|
||||
return fmt.Errorf("room not found")
|
||||
}
|
||||
updatedRoom := &database.Room{
|
||||
ID: room.ID,
|
||||
|
|
Loading…
Add table
Reference in a new issue