|
@@ -67,16 +67,18 @@ def adminsOnly(permission):
|
|
|
chatID = message.chat.id
|
|
chatID = message.chat.id
|
|
|
if not message.from_user:
|
|
if not message.from_user:
|
|
|
# For anonymous admins
|
|
# For anonymous admins
|
|
|
- #### It's a big security risk, Removing for a while
|
|
|
|
|
- # if message.sender_chat:
|
|
|
|
|
- # return await authorised(
|
|
|
|
|
- # func,
|
|
|
|
|
- # subFunc2,
|
|
|
|
|
- # client,
|
|
|
|
|
- # message,
|
|
|
|
|
- # *args,
|
|
|
|
|
- # **kwargs,
|
|
|
|
|
- # )
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ message.sender_chat
|
|
|
|
|
+ and message.sender_chat.id == message.chat.id
|
|
|
|
|
+ ):
|
|
|
|
|
+ return await authorised(
|
|
|
|
|
+ func,
|
|
|
|
|
+ subFunc2,
|
|
|
|
|
+ client,
|
|
|
|
|
+ message,
|
|
|
|
|
+ *args,
|
|
|
|
|
+ **kwargs,
|
|
|
|
|
+ )
|
|
|
return await unauthorised(message, permission, subFunc2)
|
|
return await unauthorised(message, permission, subFunc2)
|
|
|
# For admins and sudo users
|
|
# For admins and sudo users
|
|
|
userID = message.from_user.id
|
|
userID = message.from_user.id
|