fix APISocketServer not getting language channel messages

This commit is contained in:
HF 2022-01-14 02:11:12 +01:00
parent 8f4e1c83b0
commit 2f13771dba
2 changed files with 4 additions and 2 deletions

View File

@ -19,6 +19,7 @@ export class ChatProvider {
constructor() {
this.defaultChannels = {};
this.langChannels = {};
this.publicChannelIds = [];
this.enChannelId = 0;
this.infoUserId = 1;
this.eventUserId = 1;
@ -102,6 +103,7 @@ export class ChatProvider {
type,
lastTs,
];
this.publicChannelIds.push(id);
}
// find or create non-english lang channels
const langs = Object.keys(ttags);
@ -123,6 +125,7 @@ export class ChatProvider {
type,
lastTs,
};
this.publicChannelIds.push(id);
}
// find or create default users
let name = INFO_USER_NAME;

View File

@ -101,8 +101,7 @@ class APISocketServer {
return;
}
// send only messages from default and lang channels
if (!chatProvider.defaultChannels[channelId]
&& !chatProvider.langChannels[channelId]) {
if (!chatProvider.publicChannelIds.includes(channelId)) {
return;
}