diff --git a/src/Feed/EventPublisher.ts b/src/Feed/EventPublisher.ts index 842aad45..f621cf7c 100644 --- a/src/Feed/EventPublisher.ts +++ b/src/Feed/EventPublisher.ts @@ -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)) }) diff --git a/src/Feed/LoginFeed.ts b/src/Feed/LoginFeed.ts index 9ca50ffc..71ff6c2b 100644 --- a/src/Feed/LoginFeed.ts +++ b/src/Feed/LoginFeed.ts @@ -52,8 +52,7 @@ export default function useLoginFeed() { sub.Id = "login:muted"; sub.Kinds = new Set([EventKind.Lists]); sub.Authors = new Set([pubKey]); - // TODO: not sure relay support this atm, don't seem to return results - // sub.DTags = new Set([MUTE_LIST_TAG]) + sub.DTags = new Set([MUTE_LIST_TAG]) sub.Limit = 1; return sub; diff --git a/src/Feed/MuteList.ts b/src/Feed/MuteList.ts index 092d1233..4b71f5f2 100644 --- a/src/Feed/MuteList.ts +++ b/src/Feed/MuteList.ts @@ -18,8 +18,7 @@ export default function useMutedFeed(pubkey: HexKey) { sub.Id = `muted:${pubkey}`; sub.Kinds = new Set([EventKind.Lists]); sub.Authors = new Set([pubkey]); - // TODO: not sure relay support this atm, don't seem to return results - //sub.DTags = new Set([MUTE_LIST_TAG]) + sub.DTags = new Set([MUTE_LIST_TAG]) sub.Limit = 1; return sub; diff --git a/src/Nostr/Tag.ts b/src/Nostr/Tag.ts index e10af861..6ee98eec 100644 --- a/src/Nostr/Tag.ts +++ b/src/Nostr/Tag.ts @@ -8,6 +8,7 @@ export default class Tag { Relay?: string; Marker?: string; Hashtag?: string; + DTag?: string; Index: number; Invalid: boolean; @@ -36,6 +37,10 @@ export default class Tag { } break; } + case "d": { + this.DTag = tag[1]; + break; + } case "t": { this.Hashtag = tag[1]; break; @@ -61,6 +66,9 @@ export default class Tag { case "t": { return ["t", this.Hashtag!]; } + case "d": { + return ["t", this.DTag!]; + } default: { return this.Original; } diff --git a/src/index.css b/src/index.css index f6b76757..74bed443 100644 --- a/src/index.css +++ b/src/index.css @@ -124,6 +124,10 @@ button:disabled { cursor: not-allowed; color: var(--gray); } +.light button:disabled { + color: var(--font-secondary-color); + border-color: var(--font-secondary-color); +} button:hover { background-color: var(--font-color);