Bump paravel

This commit is contained in:
Jonathan Staab 2023-09-20 14:19:38 -07:00
parent 3520951742
commit 1261e3869d
3 changed files with 6 additions and 4 deletions

View File

@ -57,7 +57,7 @@
"marked": "^5.1.0",
"nostr-tools": "^1.12.1",
"npm-run-all": "^4.1.5",
"paravel": "^0.3.3",
"paravel": "^0.3.5",
"qr-scanner": "^1.4.2",
"qrcode": "^1.5.1",
"ramda": "^0.28.0",

View File

@ -5,7 +5,7 @@ import type {Event} from "src/engine2/model"
import {EventKind} from "src/engine2/model"
import {noteKinds, reactionKinds} from "src/util/nostr"
import {env, sessions, events, notificationsLastChecked} from "src/engine2/state"
import {mergeHints, getPubkeyHints, nip28ChannelsForUser} from "src/engine2/queries"
import {mergeHints, isEventMuted, getPubkeyHints, nip28ChannelsForUser} from "src/engine2/queries"
import {subscribe, subscribePersistent} from "./subscription"
export const getNotificationKinds = () =>
@ -37,7 +37,9 @@ export const loadNotifications = () => {
shouldProject: false,
relays: mergeHints(pubkeys.map(pk => getPubkeyHints(pk, "read"))),
onEvent: (e: Event) => {
events.key(e.id).set(e)
if (!isEventMuted(e)) {
events.key(e.id).set(e)
}
},
})
}
@ -69,7 +71,7 @@ export const listenForNotifications = async () => {
{kinds: noteKinds, "#e": eventIds, limit: 1},
],
onEvent: (e: Event) => {
if (kinds.includes(e.kind)) {
if (kinds.includes(e.kind) && !isEventMuted(e)) {
events.key(e.id).set(e)
}
},

BIN
yarn.lock

Binary file not shown.