Merge pull request #379 from Hexastack/fix/add-console-channel-in-patterns

fix: add console-channel before filtering
This commit is contained in:
Med Marrouchi 2024-11-27 19:48:48 +01:00 committed by GitHub
commit eba7308e16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,7 @@ import { Attachment } from '@/attachment/schemas/attachment.schema';
import { AttachmentService } from '@/attachment/services/attachment.service'; import { AttachmentService } from '@/attachment/services/attachment.service';
import EventWrapper from '@/channel/lib/EventWrapper'; import EventWrapper from '@/channel/lib/EventWrapper';
import { ContentService } from '@/cms/services/content.service'; import { ContentService } from '@/cms/services/content.service';
import { CONSOLE_CHANNEL_NAME } from '@/extensions/channels/console/settings';
import { Nlp } from '@/helper/types'; import { Nlp } from '@/helper/types';
import { I18nService } from '@/i18n/services/i18n.service'; import { I18nService } from '@/i18n/services/i18n.service';
import { LanguageService } from '@/i18n/services/language.service'; import { LanguageService } from '@/i18n/services/language.service';
@ -76,7 +77,7 @@ export class BlockService extends BaseService<Block, BlockPopulate, BlockFull> {
return ( return (
!b.trigger_channels || !b.trigger_channels ||
b.trigger_channels.length === 0 || b.trigger_channels.length === 0 ||
b.trigger_channels.includes(channel) [...b.trigger_channels, CONSOLE_CHANNEL_NAME].includes(channel)
); );
}); });