mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: unnecessary type casting
This commit is contained in:
parent
6879ff77b5
commit
c66b3c3f9d
@ -232,8 +232,7 @@ export class BlockService extends BaseService<
|
|||||||
} else if (
|
} else if (
|
||||||
typeof pattern === 'object' &&
|
typeof pattern === 'object' &&
|
||||||
'label' in pattern &&
|
'label' in pattern &&
|
||||||
text.trim().toLowerCase() ===
|
text.trim().toLowerCase() === pattern.label.toLowerCase()
|
||||||
(pattern.label as unknown as string).toLowerCase()
|
|
||||||
) {
|
) {
|
||||||
// Payload (quick reply)
|
// Payload (quick reply)
|
||||||
return [text];
|
return [text];
|
||||||
|
@ -11,7 +11,7 @@ import { OnEvent } from '@nestjs/event-emitter';
|
|||||||
|
|
||||||
import { I18nService } from '@/i18n/services/i18n.service';
|
import { I18nService } from '@/i18n/services/i18n.service';
|
||||||
import { PluginService } from '@/plugins/plugins.service';
|
import { PluginService } from '@/plugins/plugins.service';
|
||||||
import { PluginName, PluginType } from '@/plugins/types';
|
import { PluginType } from '@/plugins/types';
|
||||||
import { SettingService } from '@/setting/services/setting.service';
|
import { SettingService } from '@/setting/services/setting.service';
|
||||||
import { BaseService } from '@/utils/generics/base-service';
|
import { BaseService } from '@/utils/generics/base-service';
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ export class TranslationService extends BaseService<Translation> {
|
|||||||
if ('plugin' in block.message) {
|
if ('plugin' in block.message) {
|
||||||
const plugin = this.pluginService.getPlugin(
|
const plugin = this.pluginService.getPlugin(
|
||||||
PluginType.block,
|
PluginType.block,
|
||||||
block.message.plugin as unknown as PluginName,
|
block.message.plugin,
|
||||||
);
|
);
|
||||||
|
|
||||||
// plugin
|
// plugin
|
||||||
|
Loading…
Reference in New Issue
Block a user