bug: timeline posts only
This commit is contained in:
parent
96eefe6080
commit
8df44cd748
@ -1,6 +1,5 @@
|
|||||||
import { RawEvent } from "@snort/nostr";
|
import { RawEvent } from "@snort/nostr";
|
||||||
import { db } from "Db";
|
import { db } from "Db";
|
||||||
import { dedupe } from "Util";
|
|
||||||
import FeedCache from "./FeedCache";
|
import FeedCache from "./FeedCache";
|
||||||
|
|
||||||
class DMCache extends FeedCache<RawEvent> {
|
class DMCache extends FeedCache<RawEvent> {
|
||||||
|
@ -47,7 +47,7 @@ const Timeline = (props: TimelineProps) => {
|
|||||||
(nts: readonly TaggedRawEvent[]) => {
|
(nts: readonly TaggedRawEvent[]) => {
|
||||||
return [...nts]
|
return [...nts]
|
||||||
.sort((a, b) => b.created_at - a.created_at)
|
.sort((a, b) => b.created_at - a.created_at)
|
||||||
?.filter(a => (props.postsOnly ? !a.tags.some(b => b[0] === "e") : a.tags.some(b => b[0] === "e")))
|
?.filter(a => (props.postsOnly ? !a.tags.some(b => b[0] === "e") : true))
|
||||||
.filter(a => props.ignoreModeration || !isMuted(a.pubkey));
|
.filter(a => props.ignoreModeration || !isMuted(a.pubkey));
|
||||||
},
|
},
|
||||||
[props.postsOnly, muted, props.ignoreModeration]
|
[props.postsOnly, muted, props.ignoreModeration]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user