From 3a6a30c88a021723dfe479ab6f17a9799f6dca8a Mon Sep 17 00:00:00 2001 From: Jonathan Staab Date: Wed, 14 Jun 2023 12:41:15 -0700 Subject: [PATCH] Remove mentions from replies --- src/agent/cmd.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/agent/cmd.ts b/src/agent/cmd.ts index a292d0e5..c7bec439 100644 --- a/src/agent/cmd.ts +++ b/src/agent/cmd.ts @@ -1,4 +1,4 @@ -import {pick, uniqBy} from "ramda" +import {last, pick, uniqBy} from "ramda" import {get} from "svelte/store" import {doPipe} from "hurdak/lib/hurdak" import {parseContent, Tags, roomAttrs, displayPerson, findRoot, findReply} from "src/util/nostr" @@ -122,6 +122,7 @@ const getReplyTags = (n, inherit = false) => { const extra = inherit ? Tags.from(n) .type("e") + .reject(t => last(t) === "mention") .all() .map(t => t.slice(0, 3)) : [] @@ -160,7 +161,7 @@ class PublishableEvent { } async publish(relays, onProgress = null, verb = "EVENT") { const event = await this.getSignedEvent() - // console.log(event); return + // return console.log(event) const promise = pool.publish({relays, event, onProgress, verb}) // Copy the event since loki mutates it to add metadata