FYI @ekzyis I seem to be getting double notifications when getting zapped. For example, I’ve been zapped 10 sats twice, and each time I got a “you’ve been zapped 1 sats” then “you’ve been zapped 10 sats” push notifications. Just a heads up, otherwise I’m really enjoying this experience.
Are you on iOS and Safari? @k00b mentioned the same but I have no Apple device to debug :(
Does that mean you get 10 individual notifications if I zap you 10 times?
reply
Yes I am on iOS, using the PWA installed through safari.
Yes, I got notified for each time, but the sats count in each were weird:
2,3,2,5,5,6,8,8,9,10 sats respectively ¯\_(ツ)_/¯
reply
🤨 interesting
reply
Seems like a timing issue/race condition accessing the zap amount, if I had to guess. I’m guessing something about the push notification pipeline is asynchronous, so that would make sense.
reply
Yes, it's async so that could indeed explain why you see 2,3,2
But I don't get why the notifications are not grouped together using the tag property like on Android. Here, it says that Safari on iOS also supports it.
My guess would be there is some difference in the API for replacing notifications.
reply
Ohhh, I think I found the error.
Let me guess. If I reply three times to you, you only get a single notification which shows "you have 3 new replies", right?
Let this be the first reply.
reply
Second reply.
reply
Third reply.
Please tell me you only got one notification haha
If so, I am pretty sure what is causing the bug