fix: correctly filter with tag

This commit is contained in:
Alejandro Gomez
2023-01-27 11:47:05 +01:00
parent ba2fde425f
commit 613665c187
5 changed files with 17 additions and 5 deletions

View File

@ -1,10 +1,12 @@
import { useSelector } from "react-redux";
import { System } from "Nostr/System";
import { default as NEvent } from "Nostr/Event";
import EventKind from "Nostr/EventKind";
import Tag from "Nostr/Tag";
import { RootState } from "State/Store";
import { HexKey, RawEvent, u256, UserMetadata } from "Nostr";
import { MUTE_LIST_TAG } from "Feed/MuteList";
import { bech32ToHex } from "Util"
import { DefaultRelays, HashtagRegex } from "Const";
@ -99,7 +101,7 @@ export default function useEventPublisher() {
if (pubKey) {
let ev = NEvent.ForPubKey(pubKey);
ev.Kind = EventKind.Lists;
ev.Tags.push(new Tag(["d", "mute"], ev.Tags.length))
ev.Tags.push(new Tag(["d", MUTE_LIST_TAG], ev.Tags.length))
keys.forEach(p => {
ev.Tags.push(new Tag(["p", p], ev.Tags.length))
})