damus-io / damus

iOS nostr client
GNU General Public License v3.0
1.99k stars 288 forks source link

Bug: Receiving zap notifications when zapping others, ie "You received 42 sats from SELF" #2462

Open sudocarlos opened 6 days ago

sudocarlos commented 6 days ago

What happens I am Alice. When I zap a reply from Bob 42 sats, I receive a notification "You received 42 sats from Alice" and my wallet sends the sats.

What I expect to happen When I zap a reply from Bob, my wallet sends the sats.

Link to noteID, npub note1qx28nz8zmk8p0ucz43j977xf6xc9kmn4jrl2gugkfenp3sfwrm9s3cuvfh note100k6ltcreegtu8z8cl57k8nvmrdxkkvp7w9xlpwhmukrvkyg0q8s7pxd8n wss://relay.getalby.com/v1

Screenshots/video recording

Versions Damus version: 1.10 (8) 3902fe7b Operating system version: iOS 17.6.1 Device: iPhone 12 mini

Steps To Reproduce Steps to reproduce the behavior:

  1. Open Damus
  2. Zap a reply (or a note that you're mentioned in?)
  3. Receive a notification

Additional context This appears to happen when I am tagged in the note that I am zapping.

alltheseas commented 6 days ago

Which wallet is is Alice using?

Which wallet is Bob using?

Are Alice and/or Bob using NWC?

sudocarlos commented 6 days ago

Alice is using Alby Hub and doesn't know what wallet Bob is using. The problem doesn't seem isolated to Bob, it also happens with Carole. Alice is using NWC.

alltheseas commented 6 days ago

What is carole using? Unknown?

sudocarlos commented 6 days ago

Carole is using unknown

alltheseas commented 6 days ago

@jb55 might this be related to the alby/nwc recent fix?

sudocarlos commented 6 days ago

bfcb3e4c885ed99d0a6a79f247d434800d44614e

sudocarlos commented 6 days ago

Another symptom: it doesn't appear in the zap notifications tab, just a push notification in iOS

jb55 commented 5 days ago

vanessa has the same issue.

jb55 commented 5 days ago

I'm guessing some zappers are adding the zap receipt author to the zap itself? that's all I can think of. @danieldaquino do we notify all p tags on the zap note ?

jb55 commented 4 days ago

This is exactly the issue. Some zappers are setting p tags for the zap receiver when they should be setting the P tag instead. I just got this as well on this zap I sent:


{"kind":9735,"tags":[["p","4d4fb5ff0afb8c04e6c6e03f51281b664576f985e5bc34a3a7ee310a1e821f47"],["e","7ef9165e1d68424b5e34134ecaa47411863f736f55a0c08f3a00db517fa15507"],["bolt11","lnbc19710n1pnwg0kdpp57003xutqz8pp9yhjwju243gdgelskndj2prt7gfhkdvmskp24r8qhp5ulu3sphjfgt8tdasqsptaz5xuxcvtmq7fhzdnmk5y3rpzwv6huwqcqzzsxqrrs0sp549znyngm55n9gpsexy0d92zvcqasqe5d0k7rdg4s66u2sez7fdhq9qyyssqpwd7ar8yez6k2yymn07z3ejkfxjzw4rld80jgq740hsszwk5m4nnh2hvx74nqs5cvwysafjlu5uu6p9t9heuqk6tdjkz3fpmj32raxsppy7ync"],["description","{\"id\":\"cdf701cd336d74ae2a234b9b3490a8e641575f1995b1a874dc32a42666454d11\",\"pubkey\":\"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245\",\"created_at\":1726234316,\"kind\":9734,\"tags\":[[\"e\",\"7ef9165e1d68424b5e34134ecaa47411863f736f55a0c08f3a00db517fa15507\"],[\"p\",\"4d4fb5ff0afb8c04e6c6e03f51281b664576f985e5bc34a3a7ee310a1e821f47\"],[\"relays\",\"wss:\/\/nos.lol\",\"wss:\/\/theforest.nostr1.com\",\"wss:\/\/relay.damus.io\",\"wss:\/\/nostr.wine\",\"ws:\/\/monad.jb55.com:8080\",\"wss:\/\/relay.mostr.pub\"]],\"content\":\"\",\"sig\":\"859afb22644588574fa7002dac79a9fb6a4eb2715d494614578854420b9c3e6f7a3034baf2f6bc99b2baecbfcf22dad32cfd44dfa5b42ddd0e0c6198635aa0c1\"}"],["P","32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"]],"created_at":1726234322,"content":"","sig":"3c9bb7553278e444addc591ee3565657a8b783d47a4438cadbed6ed1ae448d470e4d2471acd21a7ab26d7a2af8c102538f00e21bdcaabf213a5fceed2895e27a","id":"6901102ac61ecfb3a051acdd2103f0b4ea7cbe4dcc58bee47ce7d8b621cd5a7b","pubkey":"f81611363554b64306467234d7396ec88455707633f54738f6c4683535098cd3"}
sudocarlos commented 4 days ago

So this should be fixed by Alby Hub changing the way theyre tagging the zap notification?

alltheseas commented 4 days ago

This sounds like a nostrability issue. Is alby the one which generates these?

https://github.com/nostrability/nostrability/issues/94

alltheseas commented 2 days ago

A couple of more reports

https://damus.io/nevent1qqsxgwyusltgyll5eh20w5ptamqqm8n7n7k2kp9x8wu8qtgw3v3kquspz4mhxue69uhks6tnwshxummnw3ezumrpdejqzynhwden5te0wahhgtn4w3ux7tn0dejszenhwden5te0ve5kcar9wghxummnw3ezuamfdejj7mnsw43rzun6vuunv7n2v9mxwct5wdur2cmgxfm8var3x3shgct5d3un2unkv3mhzem2wqc82arcwu6r27n90fh8v7t3vejxk7rkv5lkyun0v9jxxctnws7hgun4v5q3qamnwvaz7tmwdaehgu3wwa5kueg9gse62