From f29e825af40dc71466bc4f9a3f3920bf27e50a20 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Mon, 28 Mar 2022 10:22:59 +0200 Subject: [PATCH] fix(@chat): handle status being nil in stickers fixes #5195 The attribute Status is marked as omit empty in backend --- src/app_service/service/stickers/dto/stickers.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app_service/service/stickers/dto/stickers.nim b/src/app_service/service/stickers/dto/stickers.nim index cb260b703d..bfaecdaee7 100644 --- a/src/app_service/service/stickers/dto/stickers.nim +++ b/src/app_service/service/stickers/dto/stickers.nim @@ -84,7 +84,7 @@ proc toStickerPackDto*(jsonObj: JsonNode): StickerPackDto = discard jsonObj.getProp("preview", result.preview) discard jsonObj.getProp("thumbnail", result.thumbnail) - result.status = jsonObj["status"].getInt(-1).toStickerPackStatus() + result.status = jsonObj{"status"}.getInt(0).toStickerPackStatus() result.price = jsonObj["price"].getStr().parse(Stuint[256]) result.stickers = @[] for sticker in jsonObj["stickers"]: