diff --git a/sukuinote/plugins/log_forwards.py b/sukuinote/plugins/log_forwards.py index 0c8729e..3cd4e5b 100644 --- a/sukuinote/plugins/log_forwards.py +++ b/sukuinote/plugins/log_forwards.py @@ -55,7 +55,7 @@ async def log_forwards(client, message): if message.from_user.is_scam: user_text += ' [SCAM]' user_text += f' [{message.from_user.id}]' - elif message.sender_chat.id != message.chat.id: + elif message.sender_chat and message.sender_chat.id != message.chat.id: user_text = html.escape(message.sender_chat.title) if message.sender_chat.username: user_text = f'{user_text}' diff --git a/sukuinote/plugins/log_reports.py b/sukuinote/plugins/log_reports.py index ab522a3..7b30c75 100644 --- a/sukuinote/plugins/log_reports.py +++ b/sukuinote/plugins/log_reports.py @@ -39,7 +39,7 @@ async def log_reports(client, message): if message.from_user.is_scam: user_text += ' [SCAM]' user_text += f' [{message.from_user.id}]' - elif message.sender_chat.id != message.chat.id: + elif message.sender_chat and message.sender_chat.id != message.chat.id: user_text = html.escape(message.sender_chat.title) if message.sender_chat.username: user_text = f'{user_text}' @@ -75,7 +75,7 @@ async def log_reports(client, message): if reply.from_user.is_scam: user_text += ' [SCAM]' user_text += f' [{reply.from_user.id}]' - elif reply.sender_chat.id != reply.chat.id: + elif reply.sender_chat and reply.sender_chat.id != reply.chat.id: user_text = html.escape(reply.sender_chat.title) if reply.sender_chat.username: user_text = f'{user_text}'