fix APISocketServer not getting language channel messages
This commit is contained in:
parent
8f4e1c83b0
commit
2f13771dba
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user