Replace bunker with claim on alerts page

This commit is contained in:
Jon Staab
2025-06-18 17:02:32 -07:00
parent 2fae3ca248
commit 43da7d628e
3 changed files with 83 additions and 122 deletions
+4 -5
View File
@@ -372,12 +372,11 @@ export type AlertParams = {
feed: Feed
cron: string
email: string
bunker: string
secret: string
description: string
claims: Record<string, string>
}
export const makeAlert = async ({cron, email, feed, bunker, secret, description}: AlertParams) => {
export const makeAlert = async ({cron, email, feed, claims, description}: AlertParams) => {
const tags = [
["feed", JSON.stringify(feed)],
["cron", cron],
@@ -394,8 +393,8 @@ export const makeAlert = async ({cron, email, feed, bunker, secret, description}
],
]
if (bunker) {
tags.push(["nip46", secret, bunker])
for (const [relay, claim] of Object.entries(claims)) {
tags.push(["claim", relay, claim])
}
return makeEvent(ALERT, {