release-0.0.34

This commit is contained in:
Struchkov Mark 2022-09-19 20:21:31 +03:00
parent 6e4837a8e7
commit 0ac055b488
22 changed files with 58 additions and 64 deletions

View File

@ -1,20 +0,0 @@
postgres:
image: 192.168.235.157:8182/postgres:13.1-alpine
container_name: theater-postgres
hostname: postgres
restart: on-failure
networks:
- network
ports:
- 5433:5432
volumes:
- ./volume/db/01-init.sh:/docker-entrypoint-initdb.d/01-init.sh
- ./volume/db/storage:/var/lib/postgresql/data:z
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- APP_DB_USER=${DATASOURCE_USERNAME}
- APP_DB_PASS=${DATASOURCE_PASSWORD}
volumes:
gitlab-notify:

11
pom.xml
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.30</version> <version>0.0.34</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
@ -14,7 +14,7 @@
<module>telegram-domain</module> <module>telegram-domain</module>
<module>telegram-consumer</module> <module>telegram-consumer</module>
<module>telegram-context</module> <module>telegram-context</module>
<module>telegram</module> <module>telegram-simple</module>
</modules> </modules>
<name>Telegram Bot</name> <name>Telegram Bot</name>
@ -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.25</godfather.core.ver> <godfather.core.ver>0.0.27</godfather.core.ver>
<telegrambots.ver>6.1.0</telegrambots.ver> <telegrambots.ver>6.1.0</telegrambots.ver>
<haiti.version>1.4.0</haiti.version> <haiti.version>1.4.0</haiti.version>
@ -74,6 +74,11 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-core-main</artifactId> <artifactId>telegram-core-main</artifactId>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -4,6 +4,8 @@ import dev.struchkov.godfather.main.domain.content.Mail;
import org.telegram.telegrambots.meta.api.objects.CallbackQuery; import org.telegram.telegrambots.meta.api.objects.CallbackQuery;
import org.telegram.telegrambots.meta.api.objects.User; import org.telegram.telegrambots.meta.api.objects.User;
import java.time.LocalDateTime;
/** /**
* TODO: Добавить описание класса. * TODO: Добавить описание класса.
* *
@ -13,6 +15,7 @@ public class CallbackQueryConvert {
public static Mail apply(CallbackQuery callbackQuery) { public static Mail apply(CallbackQuery callbackQuery) {
final Mail mail = new Mail(); final Mail mail = new Mail();
mail.setCreateDate(LocalDateTime.now());
mail.setText(callbackQuery.getData()); mail.setText(callbackQuery.getData());
mail.setPersonId(callbackQuery.getMessage().getChatId()); mail.setPersonId(callbackQuery.getMessage().getChatId());

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modules> <modules>
<module>telegram-core-main</module> <module>telegram-core-main</module>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -55,15 +55,14 @@ public class TelegramSender implements TelegramSending {
} }
@Override @Override
public SendType getType() {
return SendType.PRIVATE;
}
public Uni<Void> sendNotSave(@NotNull Long telegramId, @NotNull BoxAnswer boxAnswer) { public Uni<Void> sendNotSave(@NotNull Long telegramId, @NotNull BoxAnswer boxAnswer) {
return sendBoxAnswer(telegramId, boxAnswer, false); return sendBoxAnswer(telegramId, boxAnswer, false);
} }
private Uni<Void> sendBoxAnswer(@NotNull Long telegramId, @NotNull BoxAnswer boxAnswer, boolean saveMessageId) { private Uni<Void> sendBoxAnswer(@NotNull Long telegramId, @NotNull BoxAnswer boxAnswer, boolean saveMessageId) {
return Uni.createFrom().voidItem()
.onItem().transformToUni(
v -> {
isNotNull(telegramId, boxAnswer); isNotNull(telegramId, boxAnswer);
if (boxAnswer.isReplace() && checkNotNull(senderStorageService)) { if (boxAnswer.isReplace() && checkNotNull(senderStorageService)) {
@ -81,6 +80,8 @@ public class TelegramSender implements TelegramSending {
return sendMessage(telegramId, boxAnswer, saveMessageId); return sendMessage(telegramId, boxAnswer, saveMessageId);
} }
} }
);
}
private Uni<Void> replaceMessage(@NotNull Long telegramId, @NotNull Integer lastMessageId, @NotNull BoxAnswer boxAnswer) { private Uni<Void> replaceMessage(@NotNull Long telegramId, @NotNull Integer lastMessageId, @NotNull BoxAnswer boxAnswer) {
return Uni.createFrom().voidItem() return Uni.createFrom().voidItem()
@ -131,7 +132,12 @@ public class TelegramSender implements TelegramSending {
} }
return Uni.createFrom().voidItem(); return Uni.createFrom().voidItem();
} }
); ).replaceWithVoid();
}
@Override
public SendType getType() {
return SendType.PRIVATE;
} }
} }

View File

@ -5,7 +5,7 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,11 +5,11 @@
<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.30</version> <version>0.0.34</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>telegram</artifactId> <artifactId>telegram-simple</artifactId>
<properties> <properties>
<maven.compiler.source>17</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>
@ -19,15 +19,15 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-core</artifactId> <artifactId>telegram-core-simple</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer-simple</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-simple-sender</artifactId> <artifactId>telegram-sender-simple</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>