From 7b72b3c8e9d9274790242e4cb46058192c4eded3 Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Fri, 31 Mar 2023 19:03:12 +0200 Subject: [PATCH] chore: add FIXME for future iterations --- .../polpetta/mezzotre/telegram/callbackquery/Dispatcher.java | 2 ++ .../com/github/polpetta/mezzotre/telegram/command/Router.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Dispatcher.java b/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Dispatcher.java index a27d181..cf3f67e 100644 --- a/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Dispatcher.java +++ b/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Dispatcher.java @@ -53,6 +53,8 @@ public class Dispatcher { .flatMap( eventName -> tgEventProcessors.stream() + // FIXME that fucking stupid, why iterate over, just use a map! Make + // mapping at startup then we're gucci for the rest of the run .filter(processor -> processor.getEventName().equals(eventName)) .findAny()) .map(processor -> processor.process(callbackQueryContext, update)) diff --git a/src/main/java/com/github/polpetta/mezzotre/telegram/command/Router.java b/src/main/java/com/github/polpetta/mezzotre/telegram/command/Router.java index 848c4d3..69ca7b9 100644 --- a/src/main/java/com/github/polpetta/mezzotre/telegram/command/Router.java +++ b/src/main/java/com/github/polpetta/mezzotre/telegram/command/Router.java @@ -61,6 +61,8 @@ public class Router { .flatMap( command -> tgCommandProcessors.stream() + // FIXME that fucking stupid, why iterate over, just use a map! Make + // mapping at startup then we're gucci for the rest of the run .filter(ex -> ex.getTriggerKeyword().equals(command)) .findAny()) .map(executor -> executor.process(chat, update))