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

Introduce generate share urls api methods #3622

Closed
borismelnik opened this issue Jun 15, 2023 · 1 comment
Closed

Introduce generate share urls api methods #3622

borismelnik opened this issue Jun 15, 2023 · 1 comment
Assignees
Labels
E:Desktop New Share URL Format Implementation of the new share URL link format and other deep link associated issues

Comments

@borismelnik
Copy link
Contributor

Problem

in fact of desktop issue

Implementation

there will be a 3 new methods to generate correct urls:
GenerateCommuntyShareURL which return generated url for community or encrypted community as well (/c/ or /c#)
GenerateCommunityChannelShareURL which return url for channel (/cc/)
GenerateProfileShareURL - which return url for open 1-to-1 chat

new one method to parse the url:
ParseSharedURL which return embedded data from url in JSON

also, 4 tests for every each method.

@borismelnik borismelnik self-assigned this Jun 15, 2023
@cammellos cammellos added the E:New Unfurling API Implementation of the new unfurling API for all links label Nov 6, 2023
@igor-sirotin igor-sirotin added E:Desktop New Share URL Format Implementation of the new share URL link format and other deep link associated issues and removed E:New Unfurling API Implementation of the new unfurling API for all links labels Aug 30, 2024
@igor-sirotin
Copy link
Collaborator

Already implemented:

status-go/services/ext/api.go

Lines 1665 to 1695 in c02ebf9

func (api *PublicAPI) ShareCommunityURLWithChatKey(communityID types.HexBytes) (string, error) {
return api.service.messenger.ShareCommunityURLWithChatKey(communityID)
}
func (api *PublicAPI) ShareCommunityURLWithData(communityID types.HexBytes) (string, error) {
return api.service.messenger.ShareCommunityURLWithData(communityID)
}
func (api *PublicAPI) ShareCommunityChannelURLWithChatKey(request *requests.CommunityChannelShareURL) (string, error) {
return api.service.messenger.ShareCommunityChannelURLWithChatKey(request)
}
func (api *PublicAPI) ShareCommunityChannelURLWithData(request *requests.CommunityChannelShareURL) (string, error) {
return api.service.messenger.ShareCommunityChannelURLWithData(request)
}
func (api *PublicAPI) ShareUserURLWithENS(pubKey string) (string, error) {
return api.service.messenger.ShareUserURLWithENS(pubKey)
}
func (api *PublicAPI) ShareUserURLWithChatKey(pubKey string) (string, error) {
return api.service.messenger.ShareUserURLWithChatKey(pubKey)
}
func (api *PublicAPI) ShareUserURLWithData(pubKey string) (string, error) {
return api.service.messenger.ShareUserURLWithData(pubKey)
}
func (api *PublicAPI) ParseSharedURL(url string) (*protocol.URLDataResponse, error) {
return protocol.ParseSharedURL(url)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:Desktop New Share URL Format Implementation of the new share URL link format and other deep link associated issues
Projects
None yet
Development

No branches or pull requests

3 participants