Исправил регулярное выражения для команды получения комментариев

This commit is contained in:
Pavel Gnedov 2022-12-15 23:32:24 +07:00
parent 9b17d703ed
commit 10cc06ec8d

View file

@ -23,7 +23,7 @@ export class SetDailyEccmUserCommentBotHandlerService
implements TelegramBotHandlerInterface
{
private service: TelegramBotService;
private regexp = /\/set_daily_eccm_user_comment (.+)/;
private regexp = /\/set_daily_eccm_user_comment.*/g;
private logger = new Logger(SetDailyEccmUserCommentBotHandlerService.name);
$messages =
@ -41,6 +41,9 @@ export class SetDailyEccmUserCommentBotHandlerService
const userMetaInfo = await this.userMetaInfoService.findByTelegramId(
msg.chat.id,
);
if (!userMetaInfo) {
this.logger.error(`User for telegram id = ${msg.chat.id} not found`);
}
const redmineUserId = userMetaInfo.user_id;
const data = this.parseData(msg.text);
if (data) {