Merge branch 'hotfix/save' into develop

# Conflicts:
#	pom.xml
This commit is contained in:
upagge 2020-05-06 13:09:30 +03:00
commit 2e50dc9e5f
No known key found for this signature in database
GPG Key ID: 15CD012E46F6BA34

View File

@ -53,7 +53,12 @@ public class AutoResponder<U extends Unit> {
public Optional<U> answer(@NonNull Long entityId, @NonNull String message) {
Optional<UnitPointer<U>> unitPointer = unitPointerService.getByEntityId(entityId);
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()) {
final U unitAnswer = answer.get();