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:
parent
0da204ed5a
commit
f5d6c895aa
2 changed files with 4 additions and 1 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue