Поправил EventDistributorService
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
945079d6e1
commit
c7595ff2e4
@ -18,6 +18,7 @@ import org.telegram.telegrambots.meta.api.objects.ChatMemberUpdated;
|
|||||||
import org.telegram.telegrambots.meta.api.objects.Message;
|
import org.telegram.telegrambots.meta.api.objects.Message;
|
||||||
import org.telegram.telegrambots.meta.api.objects.Update;
|
import org.telegram.telegrambots.meta.api.objects.Update;
|
||||||
import org.telegram.telegrambots.meta.api.objects.User;
|
import org.telegram.telegrambots.meta.api.objects.User;
|
||||||
|
import org.telegram.telegrambots.meta.api.objects.inlinequery.ChosenInlineQuery;
|
||||||
import org.telegram.telegrambots.meta.api.objects.inlinequery.InlineQuery;
|
import org.telegram.telegrambots.meta.api.objects.inlinequery.InlineQuery;
|
||||||
import org.telegram.telegrambots.meta.api.objects.payments.PreCheckoutQuery;
|
import org.telegram.telegrambots.meta.api.objects.payments.PreCheckoutQuery;
|
||||||
|
|
||||||
@ -46,12 +47,17 @@ public class EventDistributorService implements EventDistributor {
|
|||||||
final CallbackQuery callbackQuery = update.getCallbackQuery();
|
final CallbackQuery callbackQuery = update.getCallbackQuery();
|
||||||
final PreCheckoutQuery preCheckoutQuery = update.getPreCheckoutQuery();
|
final PreCheckoutQuery preCheckoutQuery = update.getPreCheckoutQuery();
|
||||||
final InlineQuery inlineQuery = update.getInlineQuery();
|
final InlineQuery inlineQuery = update.getInlineQuery();
|
||||||
|
final ChosenInlineQuery chosenInlineQuery = update.getChosenInlineQuery();
|
||||||
|
|
||||||
// запросы к боту из чатов: https://core.telegram.org/bots/inline
|
// запросы к боту из чатов: https://core.telegram.org/bots/inline
|
||||||
if (update.hasInlineQuery()) {
|
if (update.hasInlineQuery()) {
|
||||||
return Uni.createFrom().item(new EventContainer<>(InlineQuery.class, inlineQuery));
|
return Uni.createFrom().item(new EventContainer<>(InlineQuery.class, inlineQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (update.hasChosenInlineQuery()) {
|
||||||
|
return Uni.createFrom().item(new EventContainer<>(ChosenInlineQuery.class, chosenInlineQuery));
|
||||||
|
}
|
||||||
|
|
||||||
if (update.hasPreCheckoutQuery()) {
|
if (update.hasPreCheckoutQuery()) {
|
||||||
return Uni.createFrom().item(new EventContainer<>(PreCheckoutQuery.class, preCheckoutQuery));
|
return Uni.createFrom().item(new EventContainer<>(PreCheckoutQuery.class, preCheckoutQuery));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user