Skip to content

Conversation

@HedgehogNSK
Copy link
Contributor

The main purpose of this PR is to add the ability to switch between different update streams. It allows users to switch between various streams, such as long polling, webhooks, or test streams, without needing to resubscribe to a new update manager.

Core changes:

  • IUpdateManager extended with the Set(IObservable<Update>) method.
  • UpdateManager has been split into two classes: UpdateDistributor and LongPollingUpdateTracker.
  • UpdateDistributor serves as a facade that implements IUpdateManager.
  • LongPollingUpdateTracker implements IObservable<Update>.
  • UpdateManager is no longer needed but has been retained as is.
  • The TelegramBot class has been extended with a Builder that allows setting IUpdateManager and IObservable<Update>.

UpdateDistributor implements IUpdateManager
UpdateTracker implements IObservable<Update>
Add TelegramBot.Builder
Extend IUpdateManager with Set(IObservable<Update>) method
Add Rx utility entities: CustomSubjects that works similar to Rx Subject
DisposableAction that  works as Rx Disposable.Create
Desc: It didn't apply tracker to update manager
@niklasweimann niklasweimann changed the base branch from master to rework_updatemanager February 4, 2025 18:32
@niklasweimann niklasweimann merged commit 170c120 into RxTelegram:rework_updatemanager Feb 6, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants