Skip to content

Commit 0fb8f1f

Browse files
author
Pietro Albini
committed
Message.sender can now be None if not available
This was a change applied to the upstream Bot API some time ago, but wasn't reflected in botogram's source code. This commit marks that field as optional so that the deserialization of objects won't fail anymore for channel messages.
1 parent 092be24 commit 0fb8f1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

botogram/objects/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ def from_(self):
3030

3131
required = {
3232
"message_id": int,
33-
"from": User,
3433
"date": int,
3534
"chat": Chat,
3635
}
3736
optional = {
37+
"from": User,
3838
"forward_from": User,
3939
"forward_date": int,
4040
"reply_to_message": _itself,

0 commit comments

Comments
 (0)