Closed Visoff closed 3 months ago
This was probably a bug
Yeah, probably, but I ran into it even after reinstalling library and I was getting it even in docker container so it could be related to library configurations in pip registery. Also, this "bug" crashes the whole app if it sees message with shared_users and some dude could crash every telebot app by sending some person to the chat with it so it's quite dangerous
You will need to install github version as told in the readme then, NOT using pip. @Badiboy the recent version 4.19.1 does not contain the fix, does it?
The catch is that in this github repo in /telebot/version.py it says 4.19.1 and package version is also 4.19.1 but code is different.
And this version(from repo) contains the fix, it's fine, I modified my local library and it worked but the situation, where I could crash any telebot app scares me
Only bots using users shared are affected, no? Seems like if you do not have a button to share users, you are not affected, so you will not be able to crash most of telebot bots.
And it is not a catch. Versions are updated before release.
Oh, I wrongly assumed that you are able to send this type of messages freely, like contacts...
So pip just lies to us like that? By displaying the version that is technically not released yet
Oh, I just found how version tracking actually works here
Tysm for your time, explanation and solution
@Badiboy the recent version 4.19.1 does not contain the fix, does it?
It does not. SharedUsers were fixed later. I'll try to push 14.19.2 update.
I'm using (what pip says) the latest version of telebot(4.19.1) with python 3.11 and pip 24.0, but I was getting some strange errors related to message json parsing in types.py of telebot source, I went to github and pulled a copy to my machince, everything seemed to work fine, then I checked $path_to_python_venv/lib/..../telebot/types.py and found that at least on de_json function was different from what I've seen in github repo, it was de_json and init methods related to UsersShared class, starting at line 9135 of types.py file
Methods in github:
Methods in pip library: