mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 13:17:08 +00:00
Provisioning API: Correctly process power level 0
This commit is contained in:
parent
4048cc8b01
commit
7607955d7d
@ -64,9 +64,9 @@ export async function assertUserPermissionsInRoom(userId: string, roomId: string
|
||||
}
|
||||
|
||||
// TODO: Decide what PL consider "write" permissions
|
||||
const botPl = pls.users?.[intent.userId] || pls.users_default || 0;
|
||||
const userPl = pls.users?.[userId] || pls.users_default || 0;
|
||||
const requiredPl = pls.state_default || 50;
|
||||
const botPl = pls.users?.[intent.userId] ?? pls.users_default ?? 0;
|
||||
const userPl = pls.users?.[userId] ?? pls.users_default ?? 0;
|
||||
const requiredPl = pls.state_default ?? 50;
|
||||
|
||||
// Check the bot's permissions
|
||||
if (botPl < requiredPl) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user