chore: add FIXME for future iterations
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

pull/2/head
Davide Polonio 2023-03-31 19:03:12 +02:00
parent 56882c1c46
commit 7b72b3c8e9
2 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,8 @@ public class Dispatcher {
.flatMap( .flatMap(
eventName -> eventName ->
tgEventProcessors.stream() 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)) .filter(processor -> processor.getEventName().equals(eventName))
.findAny()) .findAny())
.map(processor -> processor.process(callbackQueryContext, update)) .map(processor -> processor.process(callbackQueryContext, update))

View File

@ -61,6 +61,8 @@ public class Router {
.flatMap( .flatMap(
command -> command ->
tgCommandProcessors.stream() 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)) .filter(ex -> ex.getTriggerKeyword().equals(command))
.findAny()) .findAny())
.map(executor -> executor.process(chat, update)) .map(executor -> executor.process(chat, update))