Merge branch 'hotfix/save' into develop
# Conflicts: # pom.xml
This commit is contained in:
commit
2e50dc9e5f
@ -53,7 +53,12 @@ public class AutoResponder<U extends Unit> {
|
|||||||
public Optional<U> answer(@NonNull Long entityId, @NonNull String message) {
|
public Optional<U> answer(@NonNull Long entityId, @NonNull String message) {
|
||||||
Optional<UnitPointer<U>> unitPointer = unitPointerService.getByEntityId(entityId);
|
Optional<UnitPointer<U>> unitPointer = unitPointerService.getByEntityId(entityId);
|
||||||
final Optional<U> answer = nextUnit(
|
final Optional<U> answer = nextUnit(
|
||||||
unitPointer.isPresent() ? unitPointer.get().getUnit().getNextUnits() : startUnits, message
|
unitPointer.isPresent()
|
||||||
|
&& unitPointer.get().getUnit().getNextUnits() != null
|
||||||
|
&& !unitPointer.get().getUnit().getNextUnits().isEmpty()
|
||||||
|
? unitPointer.get().getUnit().getNextUnits()
|
||||||
|
: startUnits,
|
||||||
|
message
|
||||||
);
|
);
|
||||||
if (answer.isPresent()) {
|
if (answer.isPresent()) {
|
||||||
final U unitAnswer = answer.get();
|
final U unitAnswer = answer.get();
|
||||||
|
Loading…
Reference in New Issue
Block a user