Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxdk-wasm
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
xxdk-wasm
Commits
81250579
Commit
81250579
authored
1 year ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Add DecodeInviteURL to bindings
parent
6b763c9e
No related branches found
No related tags found
2 merge requests
!109
Project/haven beta
,
!100
Xx 4601/haven invites
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wasm/channels.go
+26
-0
26 additions, 0 deletions
wasm/channels.go
with
26 additions
and
0 deletions
wasm/channels.go
+
26
−
0
View file @
81250579
...
...
@@ -623,6 +623,32 @@ func DecodePrivateURL(_ js.Value, args []js.Value) any {
return
c
}
// DecodeInviteURL decodes the channel URL, using the password, into a channel
// pretty print. This function can only be used for URLs from invitations.
//
// Parameters:
// - args[0] - The channel's share URL (string). Should be received from
// another user via invitation.
// - args[1] - The password needed to decrypt the secret data in the URL
// (string).
//
// Returns:
// - The channel pretty print (string)
func
DecodeInviteURL
(
_
js
.
Value
,
args
[]
js
.
Value
)
any
{
var
(
url
=
args
[
0
]
.
String
()
password
=
args
[
1
]
.
String
()
)
c
,
err
:=
bindings
.
DecodeInviteURL
(
url
,
password
)
if
err
!=
nil
{
exception
.
ThrowTrace
(
err
)
return
nil
}
return
c
}
// GetChannelJSON returns the JSON of the channel for the given pretty print.
//
// Parameters:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment