damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README | LICENSE

commit a78858629edf3e12ceb7cb6c290a628b8e91a223
parent ae6102b4f63e79ae6246b09e0a8eb5b1e16e72eb
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 15 Nov 2022 15:27:16 -0800

web/explore: if pow filtering is disabled, remove friends

Otherwise the explore timeline looks just like the home timeline

Diffstat:
Mweb/index.html | 4++--
Mweb/js/damus.js | 4++++
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/web/index.html b/web/index.html @@ -8,11 +8,11 @@ <link rel="stylesheet" href="css/responsive.css?v=10"> <link rel="stylesheet" href="css/fontawesome.css?v=2"> <script defer src="js/ui/util.js?v=5"></script> - <script defer src="js/ui/render.js?v=10"></script> + <script defer src="js/ui/render.js?v=11"></script> <script defer src="js/noble-secp256k1.js?v=1"></script> <script defer src="js/bech32.js?v=1"></script> <script defer src="js/nostr.js?v=6"></script> - <script defer src="js/damus.js?v=82"></script> + <script defer src="js/damus.js?v=84"></script> </head> <body> <script> diff --git a/web/js/damus.js b/web/js/damus.js @@ -357,6 +357,10 @@ function should_add_to_explore_timeline(contacts, view, ev, pow) if (view.seen.has(ev.pubkey)) return false + // hide friends for 0-pow situations + if (pow === 0 && contacts.friends.has(ev.pubkey)) + return false + return passes_spam_filter(contacts, ev, pow) }