Skip to content

Commit f7d8c42

Browse files
committed
fix: resolve linting errors for v2.3.8 release
1 parent 05c0b83 commit f7d8c42

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/api/integrations/channel/meta/whatsapp.business.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,9 @@ export class BusinessStartupService extends ChannelStartupService {
685685

686686
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
687687

688-
this.logger.log(`[CloudAPI] chatbotController.emit() remoteJid=${messageRaw.key.remoteJid}, messageType=${messageRaw.messageType}, fromMe=${messageRaw.key.fromMe}`);
688+
this.logger.log(
689+
`[CloudAPI] chatbotController.emit() remoteJid=${messageRaw.key.remoteJid}, messageType=${messageRaw.messageType}, fromMe=${messageRaw.key.fromMe}`,
690+
);
689691

690692
await chatbotController.emit({
691693
instance: { instanceName: this.instance.name, instanceId: this.instanceId },

src/api/integrations/chatbot/base-chatbot.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function getChatbotChatwootService() {
1818
if (!_chatbotChatwootService) {
1919
try {
2020
// eslint-disable-next-line @typescript-eslint/no-var-requires
21-
const mod = require('@api/server.module');
21+
const mod = eval('require')('@api/server.module');
2222
_chatbotChatwootService = mod.chatbotChatwootService;
2323
} catch {
2424
return null;

src/api/integrations/chatbot/chatbot-chatwoot.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ export class ChatbotChatwootService {
148148
});
149149

150150
if (result.count > 0) {
151-
this.logger.log(`[Coordination] Paused ${result.count} bot session(s) for ${remoteJid} (human agent responded)`);
151+
this.logger.log(
152+
`[Coordination] Paused ${result.count} bot session(s) for ${remoteJid} (human agent responded)`,
153+
);
152154
}
153155

154156
return result.count;
@@ -174,7 +176,7 @@ export class ChatbotChatwootService {
174176
if (!provider?.enabled || !provider.url || !provider.token || !provider.accountId) return false;
175177

176178
// Find the conversation ID from cache or recent messages
177-
const conversationId = await this.findChatwootConversationId(instanceId, remoteJid, provider);
179+
const conversationId = await this.findChatwootConversationId(instanceId, remoteJid);
178180
if (!conversationId) {
179181
this.logger.warn(`[Coordination] No Chatwoot conversation found for ${remoteJid}`);
180182
return false;
@@ -232,7 +234,6 @@ export class ChatbotChatwootService {
232234
private async findChatwootConversationId(
233235
instanceId: string,
234236
remoteJid: string,
235-
provider: any,
236237
): Promise<number | null> {
237238
// Strategy 1: Look at the most recent message with chatwootConversationId
238239
const recentMessage = await this.prismaRepository.message.findFirst({

0 commit comments

Comments
 (0)