-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sharing contact info causes error from sam
module
#68
Comments
I think we better use |
here's stack trace
|
actually the logger says the received message is [
{
"update_id": 693909035,
"message": {
"message_id": 625,
"from": {
"id": 101862091,
"is_bot": false,
"first_name": "Hamid",
"last_name": "Bluri",
"username": "hamidb80",
"language_code": "en"
},
"chat": {
"id": 101862091,
"first_name": "Hamid",
"last_name": "Bluri",
"username": "hamidb80",
"type": "private"
},
"date": 1640893781,
"reply_to_message": {
"message_id": 624,
"from": {
"id": 2004052302,
"is_bot": true,
"first_name": "testboybot",
"username": "mytestbiybot"
},
"chat": {
"id": 101862091,
"first_name": "Hamid",
"last_name": "Bluri",
"username": "hamidb80",
"type": "private"
},
"date": 1640893777,
"text": "\u0631\u0648\u06cc \u062f\u06a9\u0645\u0647 \u0628\u0632\u0646\u06cc\u062f"
},
"contact": {
"phone_number": "+989100020106",
"first_name": "Hamid",
"last_name": "Bluri",
"user_id": 101862091
}
}
}
]
|
here's a small reproducible example: |
I will migrate to std/json |
ba0f3
added a commit
that referenced
this issue
Jan 1, 2022
ba0f3
added a commit
that referenced
this issue
Jan 1, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
I just figured it out that sharing contact info causes
node.mapper.tokens[node.pos].kind == JSMN_STRING
to fail. [fromtoStr
function in\sam-0.1.17\sam.nim(240, 10)
]the value of
node.mapper.tokens[node.pos].kind
isJSMN_PRIMITIVE
.tested on telebot
1.0.12
nim
1.6.2
The text was updated successfully, but these errors were encountered: