fix APISocketServer not getting language channel messages
This commit is contained in:
parent
8f4e1c83b0
commit
2f13771dba
|
@ -19,6 +19,7 @@ export class ChatProvider {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.defaultChannels = {};
|
this.defaultChannels = {};
|
||||||
this.langChannels = {};
|
this.langChannels = {};
|
||||||
|
this.publicChannelIds = [];
|
||||||
this.enChannelId = 0;
|
this.enChannelId = 0;
|
||||||
this.infoUserId = 1;
|
this.infoUserId = 1;
|
||||||
this.eventUserId = 1;
|
this.eventUserId = 1;
|
||||||
|
@ -102,6 +103,7 @@ export class ChatProvider {
|
||||||
type,
|
type,
|
||||||
lastTs,
|
lastTs,
|
||||||
];
|
];
|
||||||
|
this.publicChannelIds.push(id);
|
||||||
}
|
}
|
||||||
// find or create non-english lang channels
|
// find or create non-english lang channels
|
||||||
const langs = Object.keys(ttags);
|
const langs = Object.keys(ttags);
|
||||||
|
@ -123,6 +125,7 @@ export class ChatProvider {
|
||||||
type,
|
type,
|
||||||
lastTs,
|
lastTs,
|
||||||
};
|
};
|
||||||
|
this.publicChannelIds.push(id);
|
||||||
}
|
}
|
||||||
// find or create default users
|
// find or create default users
|
||||||
let name = INFO_USER_NAME;
|
let name = INFO_USER_NAME;
|
||||||
|
|
|
@ -101,8 +101,7 @@ class APISocketServer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// send only messages from default and lang channels
|
// send only messages from default and lang channels
|
||||||
if (!chatProvider.defaultChannels[channelId]
|
if (!chatProvider.publicChannelIds.includes(channelId)) {
|
||||||
&& !chatProvider.langChannels[channelId]) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user