mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
134b7147a3
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user