Merge branch 'bugfix/answer-save-action' into develop
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
# Conflicts: # bot-context/bot-context-main/pom.xml # bot-context/bot-context-quarkus/pom.xml # bot-context/bot-context-simple/pom.xml # bot-context/pom.xml # bot-core/bot-core-main/pom.xml # bot-core/bot-core-quarkus/pom.xml # bot-core/bot-core-simple/pom.xml # bot-core/pom.xml # bot-data/bot-data-main/pom.xml # bot-data/bot-data-quarkus/pom.xml # bot-data/bot-data-simple/pom.xml # bot-data/pom.xml # bot-domain/bot-domain-main/pom.xml # bot-domain/bot-domain-quarkus/pom.xml # bot-domain/bot-domain-simple/pom.xml # bot-domain/pom.xml # bot-exception/pom.xml # pom.xml
This commit is contained in:
commit
9c4db3ff7a
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-context</artifactId>
|
<artifactId>bot-context</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-context-main</artifactId>
|
<artifactId>bot-context-main</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-context</artifactId>
|
<artifactId>bot-context</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-context-quarkus</artifactId>
|
<artifactId>bot-context-quarkus</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-context</artifactId>
|
<artifactId>bot-context</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-context-simple</artifactId>
|
<artifactId>bot-context-simple</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>godfather-bot</artifactId>
|
<artifactId>godfather-bot</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-context</artifactId>
|
<artifactId>bot-context</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-core</artifactId>
|
<artifactId>bot-core</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-core-main</artifactId>
|
<artifactId>bot-core-main</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-core</artifactId>
|
<artifactId>bot-core</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-core-quarkus</artifactId>
|
<artifactId>bot-core-quarkus</artifactId>
|
||||||
|
@ -24,28 +24,30 @@ public class AnswerSaveAction<D> implements ActionUnit<AnswerSave<Message, D>, M
|
|||||||
final AnswerSave<Message, D> answerSave = unitRequest.getUnit();
|
final AnswerSave<Message, D> answerSave = unitRequest.getUnit();
|
||||||
final Message message = unitRequest.getMessage();
|
final Message message = unitRequest.getMessage();
|
||||||
|
|
||||||
final AnswerSavePreservable<D> preservable = answerSave.getPreservable();
|
|
||||||
final String personId = message.getFromPersonId();
|
|
||||||
|
|
||||||
final CheckSave<Message> checkSave = answerSave.getCheckSave();
|
final CheckSave<Message> checkSave = answerSave.getCheckSave();
|
||||||
if (checkNotNull(checkSave)) {
|
if (checkNotNull(checkSave)) {
|
||||||
return Uni.createFrom().voidItem()
|
return Uni.createFrom().voidItem()
|
||||||
.onItem().transformToUni(
|
.onItem().transformToUni(
|
||||||
v -> checkSave.check(message)
|
v -> checkSave.check(message)
|
||||||
.onItem().transform(
|
.onItem().ifNotNull().transformToUni(
|
||||||
unit -> {
|
unit -> {
|
||||||
if (checkNotNull(unit)) {
|
if (checkNotNull(unit)) {
|
||||||
return UnitRequest.of(unit, message);
|
return Uni.createFrom().item(UnitRequest.of(unit, message));
|
||||||
}
|
}
|
||||||
return UnitRequest.of(answerSave, message);
|
return getUnitRequestUni(answerSave, message);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return getUnitRequestUni(answerSave, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Uni<UnitRequest<MainUnit, Message>> getUnitRequestUni(AnswerSave<Message, D> answerSave, Message message) {
|
||||||
|
final String personId = message.getFromPersonId();
|
||||||
|
final AnswerSavePreservable<D> preservable = answerSave.getPreservable();
|
||||||
final PreservableData<D, Message> preservableData = answerSave.getPreservableData();
|
final PreservableData<D, Message> preservableData = answerSave.getPreservableData();
|
||||||
final Pusher<D> pusher = answerSave.getPusher();
|
final Pusher<D> pusher = answerSave.getPusher();
|
||||||
|
|
||||||
return Uni.createFrom().voidItem()
|
return Uni.createFrom().voidItem()
|
||||||
.onItem().transformToUni(
|
.onItem().transformToUni(
|
||||||
v -> {
|
v -> {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>bot-core</artifactId>
|
<artifactId>bot-core</artifactId>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-core-simple</artifactId>
|
<artifactId>bot-core-simple</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>godfather-bot</artifactId>
|
<artifactId>godfather-bot</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-core</artifactId>
|
<artifactId>bot-core</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>bot-data</artifactId>
|
<artifactId>bot-data</artifactId>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-data-main</artifactId>
|
<artifactId>bot-data-main</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-data</artifactId>
|
<artifactId>bot-data</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-data-quarkus</artifactId>
|
<artifactId>bot-data-quarkus</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-data</artifactId>
|
<artifactId>bot-data</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-data-simple</artifactId>
|
<artifactId>bot-data-simple</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>godfather-bot</artifactId>
|
<artifactId>godfather-bot</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-data</artifactId>
|
<artifactId>bot-data</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>bot-domain</artifactId>
|
<artifactId>bot-domain</artifactId>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-domain-main</artifactId>
|
<artifactId>bot-domain-main</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-domain</artifactId>
|
<artifactId>bot-domain</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-domain-quarkus</artifactId>
|
<artifactId>bot-domain-quarkus</artifactId>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>bot-domain</artifactId>
|
<artifactId>bot-domain</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>bot-domain-simple</artifactId>
|
<artifactId>bot-domain-simple</artifactId>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>godfather-bot</artifactId>
|
<artifactId>godfather-bot</artifactId>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>godfather-bot</artifactId>
|
<artifactId>godfather-bot</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<groupId>dev.struchkov.godfather</groupId>
|
<groupId>dev.struchkov.godfather</groupId>
|
||||||
<artifactId>godfather-bot</artifactId>
|
<artifactId>godfather-bot</artifactId>
|
||||||
<version>0.0.68-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
Loading…
Reference in New Issue
Block a user