mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-06 00:56:56 +00:00
fix(bot): do not inherit admin from owner status
This commit is contained in:
@@ -448,7 +448,7 @@ app.get(
|
||||
|
||||
chatUser = {
|
||||
...chatUser,
|
||||
isPlatformAdmin: Boolean(moderatorUser?.isAdmin),
|
||||
isPlatformAdmin: chatUser.isBot ? false : Boolean(moderatorUser?.isAdmin),
|
||||
channelRole,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ async function requireModerationContext(
|
||||
return null;
|
||||
}
|
||||
|
||||
const isPlatformAdmin = Boolean(moderatorRecord?.isAdmin);
|
||||
const isPlatformAdmin = chatUser.isBot ? false : Boolean(moderatorRecord?.isAdmin);
|
||||
|
||||
let channelRole: ChatUser['channelRole'] = null;
|
||||
if (chatUser.isBot) {
|
||||
|
||||
Reference in New Issue
Block a user