From d4615b2cb40d6805d9bf9a99bd60a8c4213872ac Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Fri, 21 Jan 2022 19:54:53 +0100 Subject: [PATCH] Bugfixes --- src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java | 2 +- .../java/it/tdlight/reactiveapi/transformer/DefaultOptions.java | 2 +- .../it/tdlight/reactiveapi/transformer/DisableChatDatabase.java | 2 +- .../it/tdlight/reactiveapi/transformer/DisableFileDatabase.java | 2 +- .../tdlight/reactiveapi/transformer/DisableMessageDatabase.java | 2 +- .../tdlight/reactiveapi/transformer/TdlightDefaultOptions.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java b/src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java index ade34c7..ba969f9 100644 --- a/src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java +++ b/src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java @@ -135,7 +135,7 @@ public abstract class ReactiveApiPublisher { var publishedResultingEvents = telegramClient .subscribeOn(Schedulers.parallel()) // Handle signals, then return a ResultingEvent - .flatMapIterable(this::onSignal) + .concatMapIterable(this::onSignal) .doFinally(s -> LOG.trace("Finalized telegram client events")) // Transform resulting events using all the registered resulting event transformers diff --git a/src/main/java/it/tdlight/reactiveapi/transformer/DefaultOptions.java b/src/main/java/it/tdlight/reactiveapi/transformer/DefaultOptions.java index 2c94e44..36d7a1e 100644 --- a/src/main/java/it/tdlight/reactiveapi/transformer/DefaultOptions.java +++ b/src/main/java/it/tdlight/reactiveapi/transformer/DefaultOptions.java @@ -34,7 +34,7 @@ public class DefaultOptions implements ResultingEventTransformer { @Override public Flux transform(boolean isBot, Flux events) { - return events.flatMapIterable(event -> { + return events.concatMapIterable(event -> { // Append the options if the initial auth state is intercepted if (event instanceof ClientBoundResultingEvent clientBoundResultingEvent diff --git a/src/main/java/it/tdlight/reactiveapi/transformer/DisableChatDatabase.java b/src/main/java/it/tdlight/reactiveapi/transformer/DisableChatDatabase.java index f7889bb..31fd812 100644 --- a/src/main/java/it/tdlight/reactiveapi/transformer/DisableChatDatabase.java +++ b/src/main/java/it/tdlight/reactiveapi/transformer/DisableChatDatabase.java @@ -11,7 +11,7 @@ public class DisableChatDatabase implements ResultingEventTransformer { @Override public Flux transform(boolean isBot, Flux events) { - return events.flatMapIterable(event -> { + return events.concatMapIterable(event -> { // Change option if (event instanceof TDLibBoundResultingEvent tdLibBoundResultingEvent diff --git a/src/main/java/it/tdlight/reactiveapi/transformer/DisableFileDatabase.java b/src/main/java/it/tdlight/reactiveapi/transformer/DisableFileDatabase.java index d93985b..d8df0e3 100644 --- a/src/main/java/it/tdlight/reactiveapi/transformer/DisableFileDatabase.java +++ b/src/main/java/it/tdlight/reactiveapi/transformer/DisableFileDatabase.java @@ -11,7 +11,7 @@ public class DisableFileDatabase implements ResultingEventTransformer { @Override public Flux transform(boolean isBot, Flux events) { - return events.flatMapIterable(event -> { + return events.concatMapIterable(event -> { // Change option if (event instanceof TDLibBoundResultingEvent tdLibBoundResultingEvent diff --git a/src/main/java/it/tdlight/reactiveapi/transformer/DisableMessageDatabase.java b/src/main/java/it/tdlight/reactiveapi/transformer/DisableMessageDatabase.java index aeff675..f190d70 100644 --- a/src/main/java/it/tdlight/reactiveapi/transformer/DisableMessageDatabase.java +++ b/src/main/java/it/tdlight/reactiveapi/transformer/DisableMessageDatabase.java @@ -11,7 +11,7 @@ public class DisableMessageDatabase implements ResultingEventTransformer { @Override public Flux transform(boolean isBot, Flux events) { - return events.flatMapIterable(event -> { + return events.concatMapIterable(event -> { // Change option if (event instanceof TDLibBoundResultingEvent tdLibBoundResultingEvent diff --git a/src/main/java/it/tdlight/reactiveapi/transformer/TdlightDefaultOptions.java b/src/main/java/it/tdlight/reactiveapi/transformer/TdlightDefaultOptions.java index 7aa2593..80cdc10 100644 --- a/src/main/java/it/tdlight/reactiveapi/transformer/TdlightDefaultOptions.java +++ b/src/main/java/it/tdlight/reactiveapi/transformer/TdlightDefaultOptions.java @@ -29,7 +29,7 @@ public class TdlightDefaultOptions implements ResultingEventTransformer { @Override public Flux transform(boolean isBot, Flux events) { - return events.flatMapIterable(event -> { + return events.concatMapIterable(event -> { // Append the options if the initial auth state is intercepted if (event instanceof ClientBoundResultingEvent clientBoundResultingEvent