feat(links): add basic support for linking to messages#7623
Conversation
|
Jenkins BuildsClick to see older builds (12)
|
There was a problem hiding this comment.
Pull request overview
Adds end-to-end support in status-go for Status “message deep links” by introducing APIs to generate/parse message links (chat ID + message ID), ensuring shared URL detection recognizes these links, and preventing link preview unfurling from treating message links as preview targets.
Changes:
- Added
ShareMessageURL/ParseMessageURLutilities andMessageURLDatatype for message deep links. - Extended
IsStatusSharedURLto recognize message-link prefixes (https/http/internal scheme). - Updated link preview unfurling to skip message links (treat as navigational, not unfurl targets), and added message-link tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| services/sharedurls/utils.go | Implements message-link share/parse logic and expands shared URL detection. |
| services/sharedurls/types.go | Adds MessageURLData payload type. |
| services/sharedurls/service_test.go | Adds tests for sharing/parsing message links (legacy + internal scheme). |
| services/sharedurls/api.go | Exposes message-link share/parse via the public RPC API. |
| services/linkpreview/link_preview.go | Skips unfurling for message links to avoid false preview failures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #7623 +/- ##
===========================================
- Coverage 62.15% 62.14% -0.01%
===========================================
Files 868 868
Lines 119785 119895 +110
===========================================
+ Hits 74452 74509 +57
- Misses 37714 37752 +38
- Partials 7619 7634 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
14a5645 to
f6a0016
Compare
noeliaSD
left a comment
There was a problem hiding this comment.
In general LGTM! I just added a couple of questions / comments!
| for _, url := range urls { | ||
| logger.Debug("unfurling", zap.String("url", url)) | ||
|
|
||
| if sharedurls.IsStatusSharedURL(url) { |
There was a problem hiding this comment.
Could we add a small test covering the intended link preview behavior for message links?
Part of status-im/status-app#21457 Implemented status-go support for message deep links end to end by adding new shared URL APIs to create and parse message links with chat ID and message ID payloads, extending shared URL type handling and tests for the new message-link format, and updating shared URL detection so message links are recognized consistently across the backend; we also updated link preview behavior to treat message links as navigational links (not unfurl targets) to avoid false preview failures, and finalized link generation to keep chat IDs readable in the URL path while preserving parser compatibility with previously generated encoded links.
f6a0016 to
f2f311e
Compare
Part of status-im/status-app#21457
status-app PR: status-im/status-app#21485
Implemented status-go support for message deep links end to end by adding new shared URL APIs to create and parse message links with chat ID and message ID payloads, extending shared URL type handling and tests for the new message-link format, and updating shared URL detection so message links are recognized consistently across the backend; we also updated link preview behavior to treat message links as navigational links (not unfurl targets) to avoid false preview failures, and finalized link generation to keep chat IDs readable in the URL path while preserving parser compatibility with previously generated encoded links.