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>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-context</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-context-main</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-context</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-context-quarkus</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-context</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-context-simple</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>godfather-bot</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-context</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-core</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-core-main</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-core</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<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 Message message = unitRequest.getMessage();
|
||||
|
||||
final AnswerSavePreservable<D> preservable = answerSave.getPreservable();
|
||||
final String personId = message.getFromPersonId();
|
||||
|
||||
final CheckSave<Message> checkSave = answerSave.getCheckSave();
|
||||
if (checkNotNull(checkSave)) {
|
||||
return Uni.createFrom().voidItem()
|
||||
.onItem().transformToUni(
|
||||
v -> checkSave.check(message)
|
||||
.onItem().transform(
|
||||
.onItem().ifNotNull().transformToUni(
|
||||
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 Pusher<D> pusher = answerSave.getPusher();
|
||||
|
||||
return Uni.createFrom().voidItem()
|
||||
.onItem().transformToUni(
|
||||
v -> {
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>bot-core</artifactId>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-core-simple</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>godfather-bot</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-core</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>bot-data</artifactId>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-data-main</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-data</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-data-quarkus</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-data</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-data-simple</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>godfather-bot</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-data</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>bot-domain</artifactId>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-domain-main</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-domain</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-domain-quarkus</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>bot-domain</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bot-domain-simple</artifactId>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>godfather-bot</artifactId>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather</groupId>
|
||||
<artifactId>godfather-bot</artifactId>
|
||||
<version>0.0.68-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user