Удалил дефолтную клавиатуру

This commit is contained in:
Struchkov Mark 2023-03-29 01:18:41 +03:00
parent 970695e4b8
commit 14c529a595
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6

View File

@ -14,6 +14,7 @@ import dev.struchkov.haiti.context.exception.NotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -51,7 +52,8 @@ public class GeneralAutoResponder<M extends Message> {
}
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);
}
public void answer(UnitRequest<MainUnit<M>, M> unitRequest) {
public void answer(UnitRequest<MainUnit, M> unitRequest) {
if (checkNotNull(errorHandler)) {
try {
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();
if (checkNotNull(nextUnits)) {
Optional<MainUnit<M>> first = nextUnits.stream()