diff options
author | Lewis Crichton <lewi@lewisakura.moe> | 2023-08-04 19:10:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 20:10:12 +0200 |
commit | 885ad134b3d290b66d51118fcfbcf04139858228 (patch) | |
tree | 5651b17e67c162d403dd53ca9734196576ab47d1 /src | |
parent | 3e7d4e2623f03c5d436fca0434b2bc924c396620 (diff) | |
download | Vencord-885ad134b3d290b66d51118fcfbcf04139858228.tar.gz Vencord-885ad134b3d290b66d51118fcfbcf04139858228.tar.bz2 Vencord-885ad134b3d290b66d51118fcfbcf04139858228.zip |
fix(cloud): cross-client enabling without proper validation (#1531)
Diffstat (limited to 'src')
-rw-r--r-- | src/Vencord.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Vencord.ts b/src/Vencord.ts index a05ec53..508ac50 100644 --- a/src/Vencord.ts +++ b/src/Vencord.ts @@ -27,6 +27,7 @@ export { PlainSettings, Settings }; import "./utils/quickCss"; import "./webpack/patchWebpack"; +import { get as dsGet } from "./api/DataStore"; import { showNotification } from "./api/Notifications"; import { PlainSettings, Settings } from "./api/Settings"; import { patches, PMLogger, startAllPlugins } from "./plugins"; @@ -38,6 +39,22 @@ import { onceReady } from "./webpack"; import { SettingsRouter } from "./webpack/common"; async function syncSettings() { + // pre-check for local shared settings + if ( + Settings.cloud.authenticated && + await dsGet("Vencord_cloudSecret") === null // this has been enabled due to local settings share or some other bug + ) { + // show a notification letting them know and tell them how to fix it + showNotification({ + title: "Cloud Integrations", + body: "We've noticed you have cloud integrations enabled in another client! Due to limitations, you will " + + "need to re-authenticate to continue using them. Click here to go to the settings page to do so!", + color: "var(--yellow-360)", + onClick: () => SettingsRouter.open("VencordCloud") + }); + return; + } + if ( Settings.cloud.settingsSync && // if it's enabled Settings.cloud.authenticated // if cloud integrations are enabled |