do not render reposts of badge award events in timelines (#406)
* do not render reposts of badge award events * fix var name * only render reposts of kind 1 events
This commit is contained in:
parent
bc72bf6d04
commit
c4d8d871a1
@ -56,12 +56,13 @@ export default function NoteReaction(props: NoteReactionProps) {
|
||||
|
||||
const root = extractRoot();
|
||||
const isOpMuted = root && isMuted(root.pubkey);
|
||||
const shouldNotBeRendered = isOpMuted || root?.kind !== EventKind.TextNote;
|
||||
const opt = {
|
||||
showHeader: ev?.Kind === EventKind.Repost || ev?.Kind === EventKind.TextNote,
|
||||
showFooter: false,
|
||||
};
|
||||
|
||||
return isOpMuted ? null : (
|
||||
return shouldNotBeRendered ? null : (
|
||||
<div className="reaction">
|
||||
<div className="header flex">
|
||||
<ProfileImage pubkey={ev.RootPubKey} />
|
||||
@ -69,7 +70,6 @@ export default function NoteReaction(props: NoteReactionProps) {
|
||||
<NoteTime from={ev.CreatedAt * 1000} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{root ? <Note data={root} options={opt} related={[]} /> : null}
|
||||
{!root && refEvent ? (
|
||||
<p>
|
||||
|
@ -8,6 +8,7 @@ enum EventKind {
|
||||
Deletion = 5, // NIP-09
|
||||
Repost = 6, // NIP-18
|
||||
Reaction = 7, // NIP-25
|
||||
BadgeAward = 8, // NIP-58
|
||||
Relays = 10002, // NIP-65
|
||||
Ephemeral = 20_000,
|
||||
Auth = 22242, // NIP-42
|
||||
|
Loading…
x
Reference in New Issue
Block a user