vitorpamplona / amethyst

Nostr client for Android
MIT License
1.17k stars 158 forks source link

[BUG] Hyperlinks in long-form content notes #1077

Open dadofsambonzuki opened 2 months ago

dadofsambonzuki commented 2 months ago

Describe the bug

Any hyperlinks that contain nostr primitives are not opened within a web browser.

e.g.

[YakiHonne](https://yakihonne.com/article/naddr1qvzqqqr4gupzp384u7n44r8rdq74988lqcmggww998jjg0rtzfd6dpufrxy9djk8qq2nya2z2akk6j60w9jz6vpeweg4vn2g8pvrq6c73gs)

If a user has used a https:// (as opposed to a nostr://) URI then it should be honored.

The bug is compounded when Amethyst attempts to open a hyperlink (like above) that is actually a long-form note. This causes the user to become trapped within the note screen.

To Reproduce Steps to reproduce the behavior:

  1. Go to nostr:naddr1qq2nya2z2akk6j60w9jz6vpeweg4vn2g8pvrqq3qcn670f663n3ks02jnnlsvd5y88zjnefy8343ykaxs7y3nzzketrsxpqqqp65wstzn6c in Amethyst.
  2. Click on one of the URLs in the first paragraph.
  3. Try to swipe back to the previous screen.
  4. Be trapped for eternity

Expected behavior If a user has used a https:// (as opposed to a nostr://) URI then it should be honored and the web page should be loaded in a browser.

Video and Screenshots

https://github.com/user-attachments/assets/011c2b76-4f6b-4090-b5b1-f923bb5fdd5f

Bounty (in Bitcoin sats) offered for a solution

10k sats.

davotoula commented 1 month ago

Using latest amethyst (0.92.6-play) I am no longer trapped in thread when clicking on nostr links, I can go back eventually to original start.

Habla link is https and opens correctly in external browser.