Support notifications on non-1's

This commit is contained in:
Jonathan Staab 2023-06-19 08:37:51 -07:00
parent d2b82ec418
commit 5977a4099f

View File

@ -10,7 +10,7 @@
formatTimestampAsLocalISODate, formatTimestampAsLocalISODate,
createScroller, createScroller,
} from "src/util/misc" } from "src/util/misc"
import {findReplyId} from "src/util/nostr" import {findReplyId, noteKinds} from "src/util/nostr"
import Spinner from "src/partials/Spinner.svelte" import Spinner from "src/partials/Spinner.svelte"
import Tabs from "src/partials/Tabs.svelte" import Tabs from "src/partials/Tabs.svelte"
import Content from "src/partials/Content.svelte" import Content from "src/partials/Content.svelte"
@ -48,12 +48,12 @@
.slice(0, limit) .slice(0, limit)
.map(e => [e, userEvents.get(findReplyId(e))]) .map(e => [e, userEvents.get(findReplyId(e))])
.filter(([e, ref]) => { .filter(([e, ref]) => {
if (ref && ref.kind !== 1) { if (ref && !noteKinds.includes(ref.kind)) {
return false return false
} }
if (activeTab === tabs[0]) { if (activeTab === tabs[0]) {
return [1].includes(e.kind) return noteKinds.includes(e.kind)
} else { } else {
return [7, 9735].includes(e.kind) && ref return [7, 9735].includes(e.kind) && ref
} }