mirror of
https://github.com/hexastack/hexabot
synced 2025-05-31 10:57:06 +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 (
|
||||
typeof pattern === 'object' &&
|
||||
'label' in pattern &&
|
||||
text.trim().toLowerCase() ===
|
||||
(pattern.label as unknown as string).toLowerCase()
|
||||
text.trim().toLowerCase() === pattern.label.toLowerCase()
|
||||
) {
|
||||
// Payload (quick reply)
|
||||
return [text];
|
||||
|
@ -11,7 +11,7 @@ import { OnEvent } from '@nestjs/event-emitter';
|
||||
|
||||
import { I18nService } from '@/i18n/services/i18n.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 { BaseService } from '@/utils/generics/base-service';
|
||||
|
||||
@ -54,7 +54,7 @@ export class TranslationService extends BaseService<Translation> {
|
||||
if ('plugin' in block.message) {
|
||||
const plugin = this.pluginService.getPlugin(
|
||||
PluginType.block,
|
||||
block.message.plugin as unknown as PluginName,
|
||||
block.message.plugin,
|
||||
);
|
||||
|
||||
// plugin
|
||||
|
Loading…
Reference in New Issue
Block a user