From 10cc06ec8d2014022e1bb406a15bea66ca5d43c2 Mon Sep 17 00:00:00 2001 From: Pavel Gnedov Date: Thu, 15 Dec 2022 23:32:24 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=80=D0=B5=D0=B3=D1=83=D0=BB=D1=8F=D1=80=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D0=B2=D1=8B=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D1=8B=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=80=D0=B8?= =?UTF-8?q?=D0=B5=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../set-daily-eccm-user-comment.bot-handler.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/telegram-bot/handlers/set-daily-eccm-user-comment.bot-handler.service.ts b/src/telegram-bot/handlers/set-daily-eccm-user-comment.bot-handler.service.ts index 3a188b2..4c67092 100644 --- a/src/telegram-bot/handlers/set-daily-eccm-user-comment.bot-handler.service.ts +++ b/src/telegram-bot/handlers/set-daily-eccm-user-comment.bot-handler.service.ts @@ -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) {