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

Unfurl Status deep links #3762

Closed
igor-sirotin opened this issue Jul 15, 2023 · 1 comment · Fixed by #4033
Closed

Unfurl Status deep links #3762

igor-sirotin opened this issue Jul 15, 2023 · 1 comment · Fixed by #4033
Assignees
Labels
E:New Unfurling API Implementation of the new unfurling API for all links

Comments

@igor-sirotin
Copy link
Collaborator

Problem

New URL unfurling scheme was implemented in #3471.
We should also unfurl status deep links on sender side and include a preview in the message.

UnfurlURLs should follow this flow for Status deep links:

  1. If the URL contains data, decode it first
    I'm not sure if this step makes sense, because we plan to unfurl it in step 2.
    At the same time, the receiver will update the preview on reception anyway. so maybe this step is important and step 2 is redundant.
  2. Request the profile/community info directly from waku
    • RequestContactInfoFromMailserver for profile
    • RequestCommunityInfoFromMailserver for community
    • Take a think about channels, as it might contain sensitive data that the sender has access to and the receiver doesn't.
      There should be no more info than a Status deep link with data would contain.

Acceptance Criteria

UnfurlURLs should unfurl Status deep links for:

  • Profile
  • Communiy
  • Community channel

Future Steps

Support the solution in desktop/mobile.

@igor-sirotin
Copy link
Collaborator Author

igor-sirotin commented Aug 22, 2023

Problem

Current LinkPreview doesn't allow to fit all URLDataResponse properties, It obviously much smaller than we need.
Moreover, shared URLs doesn't contain contact/community thumbnails, but LinkPreview is ready to take one. We could take this opportunity and put that info to the LinkPreview as well.

LinkPreview

type LinkPreview struct {
Type protobuf.UnfurledLink_LinkType `json:"type"`
URL string `json:"url"`
Hostname string `json:"hostname"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Thumbnail LinkPreviewThumbnail `json:"thumbnail,omitempty"`
}

URLDataResponse

type URLDataResponse struct {
Community CommunityURLData `json:"community"`
Channel CommunityChannelURLData `json:"channel"`
Contact ContactURLData `json:"contact"`
}

type CommunityURLData struct {
DisplayName string `json:"displayName"`
Description string `json:"description"`
MembersCount uint32 `json:"membersCount"`
Color string `json:"color"`
TagIndices []uint32 `json:"tagIndices"`
CommunityID string `json:"communityId"`
}
type CommunityChannelURLData struct {
Emoji string `json:"emoji"`
DisplayName string `json:"displayName"`
Description string `json:"description"`
Color string `json:"color"`
ChannelUUID string `json:"channelUuid"`
}
type ContactURLData struct {
DisplayName string `json:"displayName"`
Description string `json:"description"`
PublicKey string `json:"publicKey"`
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:New Unfurling API Implementation of the new unfurling API for all links
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants