mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-09-20 10:06:32 +00:00
hide replies to blocked users
This commit is contained in:
parent
7dd233da5e
commit
08e6d797cf
@ -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),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user