node-karin 0.12.20 → 0.12.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -97,9 +97,9 @@ export class EventBaseHandler {
|
|
|
97
97
|
const role = list[permission];
|
|
98
98
|
if (!role)
|
|
99
99
|
return true;
|
|
100
|
-
if (role.role === 'owner' && this.e.sender?.role === 'owner')
|
|
100
|
+
if (role.role === 'owner' && (this.e.sender?.role === 'owner' || this.e.isMaster || this.e.isAdmin))
|
|
101
101
|
return true;
|
|
102
|
-
if (role.role === 'admin' && (this.e.sender?.role === 'owner' || this.e.sender?.role === 'admin'))
|
|
102
|
+
if (role.role === 'admin' && (this.e.sender?.role === 'owner' || this.e.sender?.role === 'admin' || this.e.isMaster || this.e.isAdmin))
|
|
103
103
|
return true;
|
|
104
104
|
this.e.reply(`暂无权限,只有${role.name}才能操作`);
|
|
105
105
|
return false;
|