Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2025-01-01 02:21:41 +00:00
commit 134b7147a3

View File

@ -428,14 +428,17 @@ export class Gateway extends EventEmitter {
this.wsServer.on('message', async ({ client, message }) => {
const app = await AppSupervisor.getInstance().getApp(client.app);
if (!app) {
return;
}
const parsedMessage = JSON.parse(message.toString());
if (!parsedMessage.type) {
return;
}
// check app has event listener
if (!app.listenerCount(`ws:setTag`)) {
app.on('ws:setTag', ({ clientId, tagKey, tagValue }) => {
this.wsServer.setClientTag(clientId, tagKey, tagValue);