hide replies to blocked users

This commit is contained in:
Martti Malmi 2023-03-27 14:07:55 +03:00
parent 7dd233da5e
commit 08e6d797cf

View File

@ -198,7 +198,19 @@ class Feed extends Component {
(events) => {
this.updateSortedEvents(
events
.filter((e) => !SocialNetwork.blockedUsers.has(e.pubkey))
.filter((e) => {
if (SocialNetwork.blockedUsers.has(e.pubkey)) {
return false;
}
const repliedMsg = Events.getEventReplyingTo(e);
if (repliedMsg) {
const author = Events.db.by('id', repliedMsg)?.pubkey;
if (author && SocialNetwork.blockedUsers.has(author)) {
return false;
}
}
return true;
})
.sort(this.sort.bind(this))
.map((e) => e.id),
);