Логирование отправляемых в телеграм сообщений
This commit is contained in:
parent
3a869023e5
commit
c2cdd4dd95
1 changed files with 9 additions and 0 deletions
|
|
@ -64,6 +64,10 @@ export class TelegramBotService {
|
||||||
`/help`
|
`/help`
|
||||||
].join('\n');
|
].join('\n');
|
||||||
}
|
}
|
||||||
|
this.logger.debug(
|
||||||
|
`Sent help message for telegramChatId = ${msg.chat.id}, ` +
|
||||||
|
`message = ${helpMessage}`,
|
||||||
|
);
|
||||||
this.bot.sendMessage(msg.chat.id, helpMessage);
|
this.bot.sendMessage(msg.chat.id, helpMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -77,6 +81,11 @@ export class TelegramBotService {
|
||||||
if (!userMetaInfo) return false;
|
if (!userMetaInfo) return false;
|
||||||
const chatId = userMetaInfo.telegram_chat_id;
|
const chatId = userMetaInfo.telegram_chat_id;
|
||||||
await this.bot.sendMessage(chatId, msg);
|
await this.bot.sendMessage(chatId, msg);
|
||||||
|
this.logger.debug(
|
||||||
|
`Sent message for redmineUserId = ${redmineId}, ` +
|
||||||
|
`telegramChatId = ${chatId}, ` +
|
||||||
|
`message = ${msg}`,
|
||||||
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue