release-0.0.34
This commit is contained in:
parent
6e4837a8e7
commit
0ac055b488
@ -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
11
pom.xml
@ -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>
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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());
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -55,31 +55,32 @@ 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) {
|
||||||
isNotNull(telegramId, boxAnswer);
|
return Uni.createFrom().voidItem()
|
||||||
|
.onItem().transformToUni(
|
||||||
|
v -> {
|
||||||
|
isNotNull(telegramId, boxAnswer);
|
||||||
|
|
||||||
if (boxAnswer.isReplace() && checkNotNull(senderStorageService)) {
|
if (boxAnswer.isReplace() && checkNotNull(senderStorageService)) {
|
||||||
return senderStorageService.getLastSendMessage(telegramId)
|
return senderStorageService.getLastSendMessage(telegramId)
|
||||||
.onItem().transformToUni(
|
.onItem().transformToUni(
|
||||||
lastId -> {
|
lastId -> {
|
||||||
if (checkNotNull(lastId)) {
|
if (checkNotNull(lastId)) {
|
||||||
return replaceMessage(telegramId, lastId, boxAnswer);
|
return replaceMessage(telegramId, lastId, boxAnswer);
|
||||||
} else {
|
} else {
|
||||||
return sendMessage(telegramId, boxAnswer, saveMessageId);
|
return sendMessage(telegramId, boxAnswer, saveMessageId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return sendMessage(telegramId, boxAnswer, saveMessageId);
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
} else {
|
);
|
||||||
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) {
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user