don't show replies to non-friends in timeline
Changelog-Fixed: Don't show replies to non-friends in timeline Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -214,9 +214,17 @@ func is_friend_event(_ ev: NostrEvent, our_pubkey: String, contacts: Contacts) -
|
||||
return true
|
||||
}
|
||||
|
||||
let pks = ev.referenced_pubkeys
|
||||
|
||||
// allow reply-to-self-or-friend case
|
||||
if pks.count == 1 && contacts.is_friend(pks[0].ref_id) {
|
||||
return true
|
||||
}
|
||||
|
||||
// show our replies?
|
||||
for pk in ev.referenced_pubkeys {
|
||||
if contacts.is_friend(pk.ref_id) {
|
||||
for pk in pks {
|
||||
// don't count self mentions here
|
||||
if pk.ref_id != ev.pubkey && contacts.is_friend(pk.ref_id) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user