Disable self-zap

This commit is contained in:
Jonathan Staab 2023-03-29 14:19:30 -05:00
parent 0f032ee05b
commit 26abf383b8
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,5 @@
# Current # Current
- [ ] Fix relays notification when multiplexing
- [ ] Disable self-zap - [ ] Disable self-zap
- [ ] Move blog to nostr - [ ] Move blog to nostr
- [ ] Improve note rendering - [ ] Improve note rendering

View File

@ -161,8 +161,9 @@ function getExecutor(urls) {
let target let target
// Try to use our multiplexer, but if it fails to connect fall back to relays // Try to use our multiplexer, but if it fails to connect fall back to relays. If
if (Config.multiplextrUrl) { // we're only connecting to a single relay, just do it directly
if (Config.multiplextrUrl && urls.length > 1) {
const socket = pool.get(Config.multiplextrUrl) const socket = pool.get(Config.multiplextrUrl)
if (!socket.error) { if (!socket.error) {
@ -321,7 +322,7 @@ async function count(filter) {
return new Promise(resolve => { return new Promise(resolve => {
const sub = executor.count(filters, { const sub = executor.count(filters, {
onCount: res => resolve(res?.count), onCount: (url, {count}) => resolve(count),
}) })
setTimeout(() => { setTimeout(() => {

View File

@ -124,7 +124,7 @@
$: $zapsTotal = sum(zaps.map(zap => zap.invoiceAmount)) / 1000 $: $zapsTotal = sum(zaps.map(zap => zap.invoiceAmount)) / 1000
$: $repliesCount = note.replies.length $: $repliesCount = note.replies.length
$: visibleNotes = note.replies.filter(r => (showContext ? true : !r.isContext)) $: visibleNotes = note.replies.filter(r => (showContext ? true : !r.isContext))
$: canZap = $person?.zapper $: canZap = $person?.zapper && $person?.pubkey !== user.getPubkey()
const onClick = e => { const onClick = e => {
const target = e.target as HTMLElement const target = e.target as HTMLElement