ark0f / tg-bot-api

Telegram Bot API parser and generators
https://ark0f.github.io/tg-bot-api
Apache License 2.0
48 stars 5 forks source link

Unresolved references in Telegram Bot API 7.2 update #20

Open kravetsone opened 3 months ago

kravetsone commented 3 months ago

The new Telegram Bot API 7.2 objects do not exist in the schema, but other objects reference them

image image

ENCRYPTEDFOREVER commented 3 months ago

Looks like this is caused by absence of description for these objects...

kravetsone commented 3 months ago

Looks like this is caused by absence of description for these objects...

Yes! We have already discussed this with the author. Would you like to do a PR?)

ENCRYPTEDFOREVER commented 3 months ago

Yes! We have already discussed this with the author.

Any suggestions on fix?

kravetsone commented 3 months ago

Yes! We have already discussed this with the author.

Any suggestions on fix?

I'm not familiar with Rust much, so I didn't do it myself. The author suggests leaving an empty string in the absence of a description

Unfortunately, the documentation is poorly done(

I tried to write in @BotTalk chats / bot support, but I got no result...

ENCRYPTEDFOREVER commented 3 months ago

I don't think I have time now to do a proper PR but for a dirty fix you can go to src/extractor.rs, line 66 and prepend

else if select_any.peek().matches(&table) {
    State::GetObjectFields {
        name: elem,
        description: RawDescription::default(),
    }
}

before the 'else' block.

ark0f commented 1 week ago

It looks like issue was fixed after they added descriptions to entities like BusinessLocation, BusinessIntro, etc 😅

nitreojs commented 1 week ago

can confirm, it has been fixed since then. the issue might be closed

ENCRYPTEDFOREVER commented 5 days ago

The issue might be closed

It might reoccur in the future, it's better to implement such case handling...