hicli/paginate: don't panic if room is deleted while fetching state
Some checks are pending
Go / Lint Go (old) (push) Waiting to run
Go / Lint Go (latest) (push) Waiting to run
JS / Lint JS (push) Waiting to run

This commit is contained in:
Tulir Asokan 2025-03-27 12:33:11 +02:00
parent d51518a190
commit 5f50cf8e77

View file

@ -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,