Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal links do not open in the browser when clicked in a message #14844

Closed
jrainville opened this issue May 17, 2024 · 2 comments · Fixed by #14845
Closed

Normal links do not open in the browser when clicked in a message #14844

jrainville opened this issue May 17, 2024 · 2 comments · Fixed by #14845
Assignees
Labels
backend-team bug Something isn't working E:Desktop New Share URL Format Implementation of the new share URL link format and other deep link associated issues
Milestone

Comments

@jrainville
Copy link
Member

Bug Report

Description

When a text contains a normal link (not a status link), clicking the link doesn't do anything and we get an error:

ERR 2024-05-17 15:25:43.599-04:00 failed to parse shared url:                topics="shared-urls-app-service" tid=551963 file=service.nim:32 url=https://curate.status.app/votes errDesription="\nstatus-go error [methodName:wakuext_parseSharedURL, code:-32000, message:not a status shared url ]\n"

Steps to reproduce

  1. Post a message with a link in a channel (eg:
hmm clicking this link doesn't do anything, bug? https://curate.status.app/votes 

what about others like https://discuss.status.app 
  1. Click on the links in the message

Nothing happens
Clicking on the unfurl works however

Expected behavior

Clicking on a link opens it in the browser

Actual behavior

Nothing happens

Additional Information

  • Status desktop version: 2.28.1 and master 4c61c115d43f39e3c10e5f9e3e79b9770ef62d67
  • Operating System: Ubuntu 22
@jrainville jrainville added bug Something isn't working backend-team labels May 17, 2024
@jrainville jrainville added this to the 2.29.0 Beta milestone May 17, 2024
jrainville added a commit that referenced this issue May 17, 2024
Fixes #14844

The problem was that links to status.app that are not shared links were still considered shared urls, because our util function can only check if it contains `status.app`.

The solution is two fold:
1. If there are Link Previews, I ask the link preview for the type of Link. If it's a normal link, I just open it.
2. If there are no Link Preview for that link, we call `parseSharedUrl` as before, but now we handle the failure by opening in the browser because we can assume that it's a normal link.
@jrainville jrainville added the E:Desktop New Share URL Format Implementation of the new share URL link format and other deep link associated issues label May 17, 2024
@jrainville jrainville self-assigned this May 17, 2024
@fryorcraken
Copy link

I noticed that one needs to click on the preview to open a link that has a preview. This is counterintuitive to me.
Seems that this issue is related.

@jrainville
Copy link
Member Author

I noticed that one needs to click on the preview to open a link that has a preview. This is counterintuitive to me. Seems that this issue is related.

Yeah that's exactly the issue. I have a fix in the linked PR

jrainville added a commit that referenced this issue May 21, 2024
…4845)

Fixes #14844

The problem was that links to status.app that are not shared links were still considered shared urls, because our util function can only check if it contains `status.app`.

The solution is two fold:
1. If there are Link Previews, I ask the link preview for the type of Link. If it's a normal link, I just open it.
2. If there are no Link Preview for that link, we call `parseSharedUrl` as before, but now we handle the failure by opening in the browser because we can assume that it's a normal link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend-team bug Something isn't working E:Desktop New Share URL Format Implementation of the new share URL link format and other deep link associated issues
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants