Fixed alert stash deduper.
This commit is contained in:
parent
f9e8e0263a
commit
5ac64d410e
|
@ -205,10 +205,10 @@ async function notify(scenes) {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const uniqueStashes = Object.values(Object.fromEntries(triggers.flatMap((trigger) => trigger.alert.stashes.map((stashId) => ({
|
const uniqueStashes = Object.values(Object.fromEntries(triggers.flatMap((trigger) => trigger.alert.stashes.map((stashId) => ({
|
||||||
sceneId: trigger.sceneId,
|
|
||||||
stashId,
|
stashId,
|
||||||
|
sceneId: trigger.sceneId,
|
||||||
userId: trigger.alert.userId,
|
userId: trigger.alert.userId,
|
||||||
}))).map((stash) => [`${stash.stash_id}:${stash.scene_id}`, stash])));
|
}))).map((stash) => [`${stash.stashId}:${stash.sceneId}`, stash])));
|
||||||
|
|
||||||
const stashEntries = uniqueStashes.map((stash) => ({
|
const stashEntries = uniqueStashes.map((stash) => ({
|
||||||
scene_id: stash.sceneId,
|
scene_id: stash.sceneId,
|
||||||
|
|
Loading…
Reference in New Issue