Avoid DMs showing up in likes

This commit is contained in:
Jon Staab 2024-05-23 14:54:16 -07:00
parent fe8265cb42
commit 2d41eb4874
2 changed files with 5 additions and 5 deletions

View File

@ -11,8 +11,6 @@
loadPubkeys([pubkey])
</script>
<span class={$$props.class}>
@<Anchor modal underline href={path}>
{displayPerson($person)}
</Anchor>
</span>
<Anchor modal class={$$props.class} href={path}>
@<span class="underline">{displayPerson($person)}</span>
</Anchor>

View File

@ -9,6 +9,7 @@ import {
getIdFilters,
isContextAddress,
LOCAL_RELAY_URL,
DIRECT_MESSAGE,
REACTION,
} from "@welshman/util"
import {Tracker} from "@welshman/net"
@ -170,6 +171,7 @@ export class FeedLoader {
return events.filter(e => {
if (repository.isDeleted(e)) return false
if (e.kind === REACTION && !isLike(e)) return false
if ([4, DIRECT_MESSAGE].includes(e.kind)) return false
if (this.isEventMuted(e, strict)) return false
if (this.opts.shouldHideReplies && Tags.fromEvent(e).parent()) return false
if (getIdOrAddress(e) === this.opts.anchor) return false