Skip to content

Commit

Permalink
Close #101, thanks to @samsamros
Browse files Browse the repository at this point in the history
  • Loading branch information
ba0f3 committed Dec 17, 2024
1 parent 0486137 commit 64f70fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/telebot/private/utils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ proc unmarshal*(n: JsonNode, T: typedesc): T {.gcsafe.} =
when T is TelegramObject:
for name, value in result.fieldPairs:
when not value.hasCustomPragma(telebotInternalUse):
let jsonKey = formatName(name)
let jsonKey = static(formatName(name))
if n.hasKey(jsonKey):
value = unmarshal(n[jsonKey], value.type)
elif result is ref:
Expand Down Expand Up @@ -128,7 +128,7 @@ proc marshal*[T](t: T, s: var string) {.inline.} =
s.add "{"
for name, value in t.fieldPairs:
when not value.hasCustomPragma(telebotInternalUse):
let jsonKey = formatName(name)
let jsonKey = static(formatName(name))
if value.isSet:
s.add("\"" & jsonKey & "\":")
marshal(value, s)
Expand Down
2 changes: 1 addition & 1 deletion telebot.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "2024.09.10"
version = "2024.12.17"
author = "Huy Doan"
description = "Async Telegram Bot API Client"
license = "MIT"
Expand Down

0 comments on commit 64f70fd

Please sign in to comment.