Merge branch 'fix-sdk-context' into 'sdk-context-main-merge'.

This commit is contained in:
Darshan
2025-03-22 14:10:49 +05:30
3 changed files with 10 additions and 2 deletions
+8
View File
@@ -94,6 +94,14 @@ export const realtime = {
const endpoint = getApiEndpoint(region);
if (endpoint !== clientRealtime.config.endpoint) {
clientRealtime.setEndpoint(endpoint);
/**
* Workaround: the SDK doesn't update the realtime in `setEndpoint`.
* Until that's fixed, we manually set the realtime endpoint like this:
*/
clientRealtime.setEndpointRealtime(
endpoint.replace('https://', 'wss://').replace('http://', 'ws://')
);
}
return clientRealtime;
}
@@ -39,7 +39,7 @@
let error: string;
onMount(async () => {
/* use console sdk here as project is not always available here. */
/* use console sdk as project is not always available here. */
const locale = await sdk.forConsole.locale.get();
const countryList = await sdk.forConsole.locale.listCountries();
@@ -40,7 +40,7 @@
let error: string;
onMount(async () => {
/* use console sdk here as project is not always available here. */
/* use console sdk as project is not always available here. */
const locale = await sdk.forConsole.locale.get();
const countryList = await sdk.forConsole.locale.listCountries();