-
Notifications
You must be signed in to change notification settings - Fork 186
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
feat: add sdk_version to HANDSHAKE message #262
Conversation
src/Constants.ts
Outdated
@@ -36,3 +36,5 @@ export const Permissions = Object.freeze({ | |||
CREATE_INSTANT_INVITE: BigFlagUtils.getFlag(0), | |||
ADMINISTRATOR: BigFlagUtils.getFlag(3), | |||
}); | |||
|
|||
export const HANDSHAKE_SDK_VERSION_MINIUM_MOBILE_VERSION = '250.5'; |
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.
Dumb question, is it okay to use this string for both iOS and Android? I remember sometimes one had a <version>.0
and the other is just <version>
@@ -4,6 +4,7 @@ | |||
import {Opcodes} from '../Discord'; | |||
import {DiscordSDK, Events, Platform} from '../index'; | |||
import {DISPATCH} from '../schema/common'; | |||
import {version as sdkVersion} from '../../package.json'; |
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.
nice
@@ -53,8 +54,9 @@ function buildConfig(format) { | |||
declaration: true, | |||
outDir: outDir, | |||
}), | |||
json(), |
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 this required for retrieving the sdk's version?
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.
yes
src/Discord.ts
Outdated
} catch { | ||
return null; | ||
} | ||
} | ||
return null; |
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.
Nit: Might be cool if we could return UNKNOWN
or some other constant, so we could determine if the version is absent because of an error or because the version is too old to attempt to provide it
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.
lgtm, here we go sdk version
No description provided.