[READ-ONLY] Mirror of https://github.com/FoxxMD/komodo-utilities. Small utilities to enhance Komodo
gotify komodo
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: Fix alert id and a logging typo

FoxxMD (Jan 13, 2025, 6:48 PM UTC) 03650bd8 ffb67d05

+2 -2
+2 -2
notifiers/common/notifierUtils.ts
··· 3 3 import { Types } from "npm:komodo_client"; 4 4 import { isAlertType, resolveableAlertIdentifier } from "./alertUtils.ts"; 5 5 6 - const alertFriendly = (alert: Types.Alert): string => `Alert ${alert._id} for ${alert.target.id}-${alert.data.type}`; 6 + const alertFriendly = (alert: Types.Alert): string => `Alert ${alert._id?.$oid} for ${alert.target.id}-${alert.data.type}`; 7 7 8 8 export const createNotifierPipe = (opts: CommonOptions) => { 9 9 ··· 33 33 // if we had a waiting unresolved then the assumption is we *do not* want to notify of the resolved status 34 34 // since it was transient 35 35 if(resolverTimeouts.has(id)) { 36 - console.debug(`Not pushing ${alertFriendly(alert)} because it is RESOVLED and had an UNRESOLVED notification that was wait waiting to be pushed (and has now been canceled).`) 36 + console.debug(`Not pushing ${alertFriendly(alert)} because it is RESOVLED and had an UNRESOLVED notification that was waiting to be pushed (and has now been canceled).`) 37 37 clearTimeout(resolverTimeouts.get(id)); 38 38 resolverTimeouts.delete(id); 39 39 return;