-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
openExternalLink
returns a { opened: boolean | null }
result
#7273
openExternalLink
returns a { opened: boolean | null }
result
#7273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the SDK is merged lgtm
openExternalLink
returns a { opened: boolean }
resultopenExternalLink
returns a { opened: boolean | null }
result
@@ -1335,6 +1335,14 @@ No scopes required | |||
|----------|--------| | |||
| url | string | | |||
|
|||
#### OpenExternalLinkResponse | |||
|
|||
> **Note:** `{ opened: null }` is returned on older Discord clients that do not report the result of the open link action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> **Note:** `{ opened: null }` is returned on older Discord clients that do not report the result of the open link action. | |
> warn | |
> `{ opened: null }` is returned on older Discord clients that do not report the result of the open link action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there an "earliest client" we can include that would have this, or just include an approximate date (clients from before November XX, 2024)? just so when this is present, it still makes sense in a month or two
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with the warn and to include a rough date (dec 24)
Edit the return type for
openExternalLink
. With this change the result ofopenExternalLink
will be an object containing a boolean valueopened
.If
opened
is true, then the link was opened by the userIf
opened
is false, then the link was not opened by the userThe lifetime of the promise is also changed. Previously the promise completed after opening the "Leaving Discord" dialog, but with this change the promise completes after the user selects an action in the dialog (visit the site, or go back). If the dialog does not appear because the site visit is automatically approved, then the promise returns
{ opened: true }
following the link opening.