-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
It's affecting SearchPublicChat and GetChat method.
Maybe it's same issue like #1
code:
chat, err := client.SearchPublicChat("tg_x64")
if err != nil {
fmt.Println(err.Error())
return
}
Error message:
json: cannot unmarshal object into Go struct field .last_message of type tdlib.MessageSender
Reason:
Since a public channel with linked group is allow an user reply without join group,
after SearchPublicChat, we can receive chat JSON like this
"interaction_info": {
"@type": "messageInteractionInfo",
"view_count": 1,
"forward_count": 1,
"reply_info": {
"@type": "messageReplyInfo",
"reply_count": 1,
"recent_repliers": [{
"@type": "messageSenderUser",
"user_id": 123456789
}
],
"last_read_inbox_message_id": 0,
"last_read_outbox_message_id": 0,
"last_message_id": 1048576
}
}
ref: https://github.com/tdlib/td/blob/v1.7.0/td/generate/scheme/td_api.tl#L721
But interaction_info do not have UnmarshalJSON method to handle multiple messageSenderUser, so go-tdlib can't parse correctly and return the error.
It's easy to reproduce on my example code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels