linkchanbot

Telegram bot frontend proxy link substituter
git clone https://git.torresjrjr.com/linkchanbot.git
Log | Files | Refs | README | LICENSE

commit 0551f36bdea7415c2f1869477d40c3d9bbafec19
parent 9b4432dbd6ee7b598f48a82ff3d4ffdae538bdd0
Author: Byron Torres <b@torresjrjr.com>
Date:   Tue, 29 Mar 2022 01:13:33 +0000

Fix further None occurences

Diffstat:
Mlinkchanbot | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 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 = '<Poll>' - user_name = '<Poll>' + user_id = '<poll>' + user_name = '<poll>' + else: + user_id = '<unknown>' + user_name = '<unknown>' chat = upd.effective_chat if chat: