Удалил дефолтную клавиатуру
This commit is contained in:
parent
970695e4b8
commit
14c529a595
@ -14,6 +14,7 @@ import dev.struchkov.haiti.context.exception.NotFoundException;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -51,7 +52,8 @@ public class GeneralAutoResponder<M extends Message> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void registrationActionUnit(ActionUnit actionUnit) {
|
public void registrationActionUnit(ActionUnit actionUnit) {
|
||||||
actionUnitMap.computeIfAbsent(actionUnit.getUnitType(), k -> new HashMap<>()).putIfAbsent(actionUnit.getMessageType(), actionUnit);
|
actionUnitMap.computeIfAbsent(actionUnit.getUnitType(), k -> new ArrayList<>());
|
||||||
|
actionUnitMap.get(actionUnit.getUnitType()).add(actionUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -132,7 +134,7 @@ public class GeneralAutoResponder<M extends Message> {
|
|||||||
return accessibility.isEmpty() || accessibility.get().check(message);
|
return accessibility.isEmpty() || accessibility.get().check(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void answer(UnitRequest<MainUnit<M>, M> unitRequest) {
|
public void answer(UnitRequest<MainUnit, M> unitRequest) {
|
||||||
if (checkNotNull(errorHandler)) {
|
if (checkNotNull(errorHandler)) {
|
||||||
try {
|
try {
|
||||||
unitRequest = getAction(unitRequest);
|
unitRequest = getAction(unitRequest);
|
||||||
@ -146,7 +148,7 @@ public class GeneralAutoResponder<M extends Message> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private UnitRequest<MainUnit<M>, M> activeUnitAfter(UnitRequest<MainUnit<M>, M> unitRequest) {
|
private UnitRequest<MainUnit, M> activeUnitAfter(UnitRequest<MainUnit, M> unitRequest) {
|
||||||
final Set<MainUnit<M>> nextUnits = unitRequest.getUnit().getNextUnits();
|
final Set<MainUnit<M>> nextUnits = unitRequest.getUnit().getNextUnits();
|
||||||
if (checkNotNull(nextUnits)) {
|
if (checkNotNull(nextUnits)) {
|
||||||
Optional<MainUnit<M>> first = nextUnits.stream()
|
Optional<MainUnit<M>> first = nextUnits.stream()
|
||||||
|
Loading…
Reference in New Issue
Block a user