fix(cloudlyapiclient): update typedsocket identity tagging to use async setTag API
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/api',
|
||||
version: '5.3.5',
|
||||
description: 'Type-safe API client for Cloudly and the serve.zone control plane.'
|
||||
}
|
||||
@@ -110,7 +110,7 @@ export class CloudlyApiClient {
|
||||
const identity = response.identity;
|
||||
|
||||
if (optionsArg.tagConnection) {
|
||||
this.typedsocketClient.addTag('identity', identity);
|
||||
await this.typedsocketClient.setTag('identity', identity);
|
||||
}
|
||||
|
||||
if (optionsArg.statefullIdentity) {
|
||||
@@ -225,7 +225,7 @@ export class CloudlyApiClient {
|
||||
this.identity = response.identity;
|
||||
// If WS connection is available, tag it with identity for server-side guards
|
||||
if (this.typedsocketClient) {
|
||||
try { this.typedsocketClient.addTag('identity', this.identity); } catch {}
|
||||
try { await this.typedsocketClient.setTag('identity', this.identity); } catch {}
|
||||
}
|
||||
return this.identity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user