From d1c1783c631f699ea0fd12a33319648260cb646f Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Wed, 15 Feb 2023 22:56:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8F,=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=BF=D1=8B=D1=82=D0=B0=D0=B5=D1=82=D1=81=D1=8F=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D1=82=D1=8C=20=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/notify/NewProjectNotifyGenerator.java | 2 +- .../struchkov/bot/gitlab/telegram/unit/MenuConfig.java | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewProjectNotifyGenerator.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewProjectNotifyGenerator.java index 7e2ba59..fdb7b94 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewProjectNotifyGenerator.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewProjectNotifyGenerator.java @@ -27,7 +27,7 @@ public class NewProjectNotifyGenerator implements NotifyBoxAnswerGeneratorbuilder() .triggerCheck(mail -> !personInformation.getTelegramId().equals(mail.getPersonId())) .answer(message -> { - final String messageText = new StringBuilder("\uD83D\uDEA8 *Попытка несанкционированного доступа к боту*") + final String messageText = new StringBuilder("\uD83D\uDEA8 *Attempted unauthorized access to the bot*") .append(Icons.HR) - .append("\uD83E\uDDB9\u200D♂️: ").append(message.getPersonId()).append("\n") + .append("\uD83E\uDDB9\u200D♂️: ").append( + message.getPayLoad(MailPayload.USERNAME) + .map(username -> "@" + username) + .orElseThrow() + ).append("\n") .append("\uD83D\uDCAC: ").append(message.getText()) .toString(); return BoxAnswer.builder().recipientPersonId(personInformation.getTelegramId()).message(messageText).build();