diff --git a/sukuinote/plugins/log_reports.py b/sukuinote/plugins/log_reports.py
index e3e7546..dadc804 100644
--- a/sukuinote/plugins/log_reports.py
+++ b/sukuinote/plugins/log_reports.py
@@ -1,7 +1,7 @@
import html
import asyncio
from pyrogram import Client, filters
-from .. import config, help_dict, slave, log_errors
+from .. import config, slave, log_errors
reported = set()
lock = asyncio.Lock()
@@ -48,22 +48,22 @@ async def log_reports(client, message):
reply = message.reply_to_message
if not getattr(reply, 'empty', True):
text += '\n- Reportee: '
- if message.reply_to_message.from_user:
- user_text = message.reply_to_message.from_user.first_name
- if message.reply_to_message.from_user.last_name:
- user_text += f' {message.reply_to_message.from_user.last_name}'
- user_text = '[DELETED]
' if message.from_user.is_deleted else html.escape(user_text or 'Empty???')
- if message.reply_to_message.from_user.is_verified:
+ if reply.from_user:
+ user_text = reply.from_user.first_name
+ if reply.from_user.last_name:
+ user_text += f' {reply.from_user.last_name}'
+ user_text = '[DELETED]
' if reply.from_user.is_deleted else html.escape(user_text or 'Empty???')
+ if reply.from_user.is_verified:
user_text += ' [VERIFIED]
'
- if message.reply_to_message.from_user.is_support:
+ if reply.from_user.is_support:
user_text += ' [SUPPORT]
'
- if message.reply_to_message.from_user.is_scam:
+ if reply.from_user.is_scam:
user_text += ' [SCAM]
'
- user_text += f' [{message.reply_to_message.from_user.id}
]'
+ user_text += f' [{reply.from_user.id}
]'
else:
user_text = 'None???'
- text += f'{user_text}\n- Reported Message'
- mtext = message.reply_to_message.text or message.reply_to_message.caption or ''
+ text += f'{user_text}\n- Reported Message'
+ mtext = reply.text or reply.caption or ''
if mtext.strip():
text += ':'
text += f' {html.escape(mtext.strip()[:1000])}'