godfather up to 0.0.32

This commit is contained in:
Struchkov Mark 2022-12-13 22:03:48 +03:00
parent 7fda16b63c
commit b25f085727
23 changed files with 63 additions and 59 deletions

View File

@ -5,7 +5,7 @@
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
@ -38,7 +38,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<godfather.core.ver>0.0.31</godfather.core.ver> <godfather.core.ver>0.0.32</godfather.core.ver>
<telegrambots.ver>6.3.0</telegrambots.ver> <telegrambots.ver>6.3.0</telegrambots.ver>
<haiti.version>2.0.0</haiti.version> <haiti.version>2.0.0</haiti.version>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-consumer-main</artifactId> <artifactId>telegram-consumer-main</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-consumer-quarkus</artifactId> <artifactId>telegram-consumer-quarkus</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-consumer-simple</artifactId> <artifactId>telegram-consumer-simple</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-context</artifactId> <artifactId>telegram-context</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-context</artifactId> <artifactId>telegram-context</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-context-main</artifactId> <artifactId>telegram-context-main</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-context</artifactId> <artifactId>telegram-context</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-context-quarkus</artifactId> <artifactId>telegram-context-quarkus</artifactId>

View File

@ -7,6 +7,6 @@ import org.jetbrains.annotations.NotNull;
public interface TelegramSending extends Sending { public interface TelegramSending extends Sending {
Uni<Void> sendNotSave(@NotNull String personId, @NotNull BoxAnswer boxAnswer); Uni<Void> sendNotSave(@NotNull BoxAnswer boxAnswer);
} }

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>telegram-context</artifactId> <artifactId>telegram-context</artifactId>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-context-simple</artifactId> <artifactId>telegram-context-simple</artifactId>

View File

@ -6,6 +6,6 @@ import org.jetbrains.annotations.NotNull;
public interface TelegramSending extends Sending { public interface TelegramSending extends Sending {
void sendNotSave(@NotNull String personId, @NotNull BoxAnswer boxAnswer); void sendNotSave(@NotNull BoxAnswer boxAnswer);
} }

View File

@ -5,8 +5,9 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modules> <modules>
<module>telegram-core-main</module> <module>telegram-core-main</module>
<module>telegram-core-simple</module> <module>telegram-core-simple</module>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-core</artifactId> <artifactId>telegram-core</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-core-main</artifactId> <artifactId>telegram-core-main</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>telegram-core</artifactId> <artifactId>telegram-core</artifactId>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-core-quarkus</artifactId> <artifactId>telegram-core-quarkus</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-core</artifactId> <artifactId>telegram-core</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-core-simple</artifactId> <artifactId>telegram-core-simple</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-domain</artifactId> <artifactId>telegram-domain</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-sender</artifactId> <artifactId>telegram-sender</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-sender</artifactId> <artifactId>telegram-sender</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-sender-main</artifactId> <artifactId>telegram-sender-main</artifactId>

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-sender</artifactId> <artifactId>telegram-sender</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-sender-quarkus</artifactId> <artifactId>telegram-sender-quarkus</artifactId>

View File

@ -50,8 +50,8 @@ public class TelegramSender implements TelegramSending {
} }
@Override @Override
public Uni<Void> send(@NotNull String telegramId, @NotNull BoxAnswer boxAnswer) { public Uni<Void> send(@NotNull BoxAnswer boxAnswer) {
return sendBoxAnswer(telegramId, boxAnswer, true); return sendBoxAnswer(boxAnswer, true);
} }
@Override @Override
@ -60,27 +60,28 @@ public class TelegramSender implements TelegramSending {
} }
@Override @Override
public Uni<Void> sendNotSave(@NotNull String telegramId, @NotNull BoxAnswer boxAnswer) { public Uni<Void> sendNotSave(@NotNull BoxAnswer boxAnswer) {
return sendBoxAnswer(telegramId, boxAnswer, false); return sendBoxAnswer(boxAnswer, false);
} }
private Uni<Void> sendBoxAnswer(@NotNull String telegramId, @NotNull BoxAnswer boxAnswer, boolean saveMessageId) { private Uni<Void> sendBoxAnswer(@NotNull BoxAnswer boxAnswer, boolean saveMessageId) {
return Uni.createFrom().voidItem() return Uni.createFrom().voidItem()
.onItem().transformToUni( .onItem().transformToUni(
v -> { v -> {
final String recipientTelegramId = boxAnswer.getRecipientPersonId();
if (boxAnswer.isReplace() && checkNotNull(senderRepository)) { if (boxAnswer.isReplace() && checkNotNull(senderRepository)) {
return senderRepository.getLastSendMessage(telegramId) return senderRepository.getLastSendMessage(recipientTelegramId)
.onItem().transformToUni( .onItem().transformToUni(
lastId -> { lastId -> {
if (checkNotNull(lastId)) { if (checkNotNull(lastId)) {
return replaceMessage(telegramId, lastId, boxAnswer); return replaceMessage(recipientTelegramId, lastId, boxAnswer);
} else { } else {
return sendMessage(telegramId, boxAnswer, saveMessageId); return sendMessage(recipientTelegramId, boxAnswer, saveMessageId);
} }
} }
); );
} else { } else {
return sendMessage(telegramId, boxAnswer, saveMessageId); return sendMessage(recipientTelegramId, boxAnswer, saveMessageId);
} }
} }
); );

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-sender</artifactId> <artifactId>telegram-sender</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-sender-simple</artifactId> <artifactId>telegram-sender-simple</artifactId>

View File

@ -50,8 +50,9 @@ public class TelegramSender implements TelegramSending {
} }
@Override @Override
public void send(@NotNull String telegramId, @NotNull BoxAnswer boxAnswer) { public void send(@NotNull BoxAnswer boxAnswer) {
sendBoxAnswer(telegramId, boxAnswer, true); isNotNull(boxAnswer.getRecipientPersonId());
sendBoxAnswer(boxAnswer, true);
} }
@Override @Override
@ -60,12 +61,13 @@ public class TelegramSender implements TelegramSending {
} }
@Override @Override
public void sendNotSave(@NotNull String telegramId, @NotNull BoxAnswer boxAnswer) { public void sendNotSave(@NotNull BoxAnswer boxAnswer) {
sendBoxAnswer(telegramId, boxAnswer, false); sendBoxAnswer(boxAnswer, false);
} }
private void sendBoxAnswer(@NotNull String telegramId, @NotNull BoxAnswer boxAnswer, boolean saveMessageId) { private void sendBoxAnswer(BoxAnswer boxAnswer, boolean saveMessageId) {
isNotNull(telegramId, boxAnswer); final String recipientTelegramId = boxAnswer.getRecipientPersonId();
isNotNull(recipientTelegramId);
for (PreSendProcessing preSendProcessor : preSendProcessors) { for (PreSendProcessing preSendProcessor : preSendProcessors) {
boxAnswer = preSendProcessor.pretreatment(boxAnswer); boxAnswer = preSendProcessor.pretreatment(boxAnswer);
@ -73,19 +75,19 @@ public class TelegramSender implements TelegramSending {
try { try {
if (boxAnswer.isReplace() && checkNotNull(senderRepository)) { if (boxAnswer.isReplace() && checkNotNull(senderRepository)) {
final Optional<Integer> optLastId = senderRepository.getLastSendMessage(telegramId); final Optional<Integer> optLastId = senderRepository.getLastSendMessage(recipientTelegramId);
if (optLastId.isPresent()) { if (optLastId.isPresent()) {
replaceMessage(telegramId, optLastId.get(), boxAnswer); replaceMessage(recipientTelegramId, optLastId.get(), boxAnswer);
} else { } else {
sendMessage(telegramId, boxAnswer, saveMessageId); sendMessage(recipientTelegramId, boxAnswer, saveMessageId);
} }
} else { } else {
sendMessage(telegramId, boxAnswer, saveMessageId); sendMessage(recipientTelegramId, boxAnswer, saveMessageId);
} }
} catch (TelegramApiRequestException e) { } catch (TelegramApiRequestException e) {
log.error(e.getApiResponse()); log.error(e.getApiResponse());
if (ERROR_REPLACE_MESSAGE.equals(e.getApiResponse())) { if (ERROR_REPLACE_MESSAGE.equals(e.getApiResponse())) {
sendMessage(telegramId, boxAnswer, saveMessageId); sendMessage(recipientTelegramId, boxAnswer, saveMessageId);
} }
} catch (TelegramApiException e) { } catch (TelegramApiException e) {
log.error(e.getMessage()); log.error(e.getMessage());

View File

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.42</version> <version>0.0.43</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-simple</artifactId> <artifactId>telegram-simple</artifactId>