From 0551f36bdea7415c2f1869477d40c3d9bbafec19 Mon Sep 17 00:00:00 2001 From: Byron Torres Date: Tue, 29 Mar 2022 01:13:33 +0000 Subject: [PATCH] Fix further None occurences --- linkchanbot | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/linkchanbot b/linkchanbot index 782f502..41b94ea 100755 --- a/linkchanbot +++ b/linkchanbot @@ -238,12 +238,15 @@ def mk_status(upd, utype, dl='::', text=None): if upd.effective_user: user_id = upd.effective_user.id user_name = upd.effective_user.name - elif upd.channel_post: + elif upd.channel_post and upd.channel_post.from_user: user_id = upd.channel_post.from_user.id user_name = upd.channel_post.from_user.name elif upd.poll: - user_id = '' - user_name = '' + user_id = '' + user_name = '' + else: + user_id = '' + user_name = '' chat = upd.effective_chat if chat: -- 2.38.5