3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Fix counters set_value not defaulting nulls if not using per_user/per_channel (#366)

This commit is contained in:
Tiago R 2023-07-01 11:58:01 +01:00 committed by GitHub
parent 0da204ed5a
commit f5d6c895aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -25,6 +25,9 @@ export async function setCounterValue(
throw new Error(`Counter is per user but no user ID was supplied`);
}
channelId = counter.per_channel ? channelId : null;
userId = counter.per_user ? userId : null;
const counterId = pluginData.state.counterIds[counterName];
const lock = await pluginData.locks.acquire(counterIdLock(counterId));