This pull request applies following patches to the code:
The method get_forum_topics_by_id was giving me attribute errors for some time, so instead of accessing attributes directly, I made it use getattr (e.g. getattr(r, "messages", [])); so it doesn't raise attribute errors anymore.
Been testing this on my own fork and been working fine for a while.
Also ForumTopic._parse does indeed need messages parameters to get passed to it (so it can later on use top_message (int32) from its raw type to fetch the top message from the messages we have provided it)... (previously we were passing messages parameter to this method as well, but in a recent commit, this got removed).
The promote_chat_member method was using edit_stories=privileges.can_post_stories, which is wrong.
inline_query_result_animation is using input_message_content.write method (which is an async method) without using await keyword. (For proof you can check other inline query result types, such as audio; all of them are using await for .write method.
Official clients have the ability to upload something called "Public Profile Photo":
In MTProto, that's literally possible by passing a bool parameter called fallback to set_profile_photo.
There is a bug in download_media that is caused by recent commits; whereas the method does not check for file_id field (e.g. when message.document is passed to the method) and hence will raise exception. This was working fine in previous versions.
This pull request applies following patches to the code:
The method
get_forum_topics_by_id
was giving me attribute errors for some time, so instead of accessing attributes directly, I made it usegetattr
(e.g.getattr(r, "messages", [])
); so it doesn't raise attribute errors anymore. Been testing this on my own fork and been working fine for a while. AlsoForumTopic._parse
does indeed needmessages
parameters to get passed to it (so it can later on usetop_message
(int32) from its raw type to fetch the top message from the messages we have provided it)... (previously we were passingmessages
parameter to this method as well, but in a recent commit, this got removed).The
promote_chat_member
method was usingedit_stories=privileges.can_post_stories
, which is wrong.inline_query_result_animation
is usinginput_message_content.write
method (which is an async method) without usingawait
keyword. (For proof you can check other inline query result types, such as audio; all of them are usingawait
for.write
method.Official clients have the ability to upload something called "Public Profile Photo":
In MTProto, that's literally possible by passing a bool parameter called
fallback
toset_profile_photo
.download_media
that is caused by recent commits; whereas the method does not check forfile_id
field (e.g. whenmessage.document
is passed to the method) and hence will raise exception. This was working fine in previous versions.