Don't render quotes if the note is rendered as a reply

This commit is contained in:
Jonathan Staab 2023-04-13 08:52:16 -05:00
parent 6d4a9c8d0d
commit 598b6da8c3
4 changed files with 13 additions and 10 deletions

View File

@ -169,7 +169,7 @@ class PublishableEvent {
const createdAt = Math.round(new Date().valueOf() / 1000)
if (tagClient) {
tags.push(["client", "coracle"])
tags = tags.filter(t => t[0] !== 'client').concat([["client", "coracle"]])
}
this.event = {kind, content, tags, pubkey, created_at: createdAt}

View File

@ -165,7 +165,7 @@
You have muted this note.
</p>
{:else}
<NoteContent {note} {showEntire} />
<NoteContent {anchorId} {note} {showEntire} />
{/if}
<NoteActions
bind:this={actions}

View File

@ -18,6 +18,7 @@
import {routes} from "src/app/state"
export let note
export let anchorId = null
export let maxLength = 700
export let showEntire = false
export let showMedia = user.getSetting("showMedia")
@ -41,7 +42,7 @@
) {
if (type === "link") {
links.push(value)
} else {
} else if (value.id !== anchorId) {
entities.push({type, value})
}
@ -128,13 +129,15 @@
{value.replace(/https?:\/\/(www\.)?/, "")}
</Anchor>
{:else if type.startsWith("nostr:")}
<Anchor href={"/" + value.entity}>
{#if value.pubkey}
{#if value.pubkey}
@<Anchor href={"/" + value.entity}>
{displayPerson(getPersonWithFallback(value.pubkey))}
{:else}
</Anchor>
{:else}
<Anchor href={"/" + value.entity}>
{value.entity.slice(0, 16) + "..."}
{/if}
</Anchor>
</Anchor>
{/if}
{:else}
{value}
{/if}

View File

@ -158,11 +158,11 @@
}
const openProfileInfo = () => {
modal.push({type: "person/info", $person})
modal.push({type: "person/info", person: $person})
}
const share = () => {
modal.push({type: "person/share", $person})
modal.push({type: "person/share", person: $person})
}
</script>