исправление бага
This commit is contained in:
parent
807341e685
commit
2159ee3817
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.sadtech.autoresponder</groupId>
|
||||
<artifactId>autoresponder</artifactId>
|
||||
<version>1.9.3-RELEASE</version>
|
||||
<version>1.9.4-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Abstract Autoresponder</name>
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user