Commit graph

2815 commits

Author SHA1 Message Date
Maybe Waffle
a76eb6aa0e Add 0.6->0.7 to migration guide 2022-04-14 14:40:28 +04:00
Maybe Waffle
fc509912ff Remove dev-branch docs 2022-04-14 14:35:24 +04:00
Waffle Maybe
e7b86d038b
Merge pull request #590 from mattrighetti/patch-2
Add Libgen bot to examples in README
2022-04-14 04:17:48 +04:00
Mattia Righetti
2bcc229e8f
Add Libegen bot to examples in README 2022-04-13 14:46:48 +02:00
Maybe Waffle
f48c4f7886 Allow changing update distribution function 2022-04-13 16:42:47 +04:00
Maybe Waffle
adccdbae1c move some clones() around 2022-04-13 16:18:04 +04:00
Maybe Waffle
c9a6b77434 Make worker queue size in dp configurable 2022-04-13 16:17:06 +04:00
Waffle Maybe
050ede23fa
Merge pull request #586 from teloxide/update_core_050
Update `teloxide-core` `0.4.5` -> `0.5.0`
2022-04-13 16:06:42 +04:00
Maybe Waffle
2aa59d760a Update teloxide-core 0.4.5 -> 0.5.0 2022-04-13 15:58:29 +04:00
Hirrolot
ba5dc486ce
Merge pull request #585 from teloxide/concurrent-dispatching
Implement concurrent update dispatching
2022-04-13 17:38:50 +06:00
Hirrolot
71c647b2c9 Fix .for_each on self.workers 2022-04-13 16:18:02 +06:00
Hirrolot
b2ad297029 Fix formatting 2022-04-13 16:11:47 +06:00
Hirrolot
2e8ed1fa3c
Remove redundant Arc::clone
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
2022-04-13 16:10:41 +06:00
Hirrolot
556068fdb1
Wait for workers concurrently
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
2022-04-13 16:09:00 +06:00
Hirrolot
579d5a7b7c Wait for workers by .awaiting join handles 2022-04-13 14:05:46 +06:00
Hirrolot
6a83fa5604 Remove redundant async move blocks 2022-04-13 13:40:27 +06:00
Hirrolot
e4459c408d Remove the redundant Box in DefaultHandler 2022-04-13 13:38:05 +06:00
Hirrolot
c2bc945d27 Add some helpful comments 2022-04-13 12:11:02 +06:00
Hirrolot
d6521662b4 Switch worker and default worker impls 2022-04-13 12:07:32 +06:00
Hirrolot
7e34d7ea47 Implement concurrent update handling 2022-04-13 02:45:02 +06:00
Hirrolot
5e21c4d881
Merge pull request #582 from teloxide/deprecate-dispatch-by
Deprecate `HandlerFactory` and `HandlerExt::dispatch_by`
2022-04-10 22:53:37 +06:00
Waffle Maybe
6770f5fc61
Merge pull request #583 from teloxide/fix-dispatcher-graceful-shutdown
Fix dispatcher's graceful shutdown
2022-04-09 00:43:07 +04:00
Hirrolot
50c7cfe9d2 Fix dispatcher's graceful shutdown 2022-04-09 02:33:52 +06:00
Hirrolot
3b01169751
Merge pull request #581 from teloxide/dialogue-must-use
Mark `Dialogue::{new, chat_id}` as `#[must_use]`
2022-04-08 14:54:41 +06:00
Hirrolot
ffcdba0e1d Deprecate HandlerFactory and HandlerExt::dispatch_by 2022-04-08 00:18:13 +06:00
Hirrolot
f3b4769bc5 Mark Dialogue::{new, chat_id} as #[must_use] 2022-04-08 00:03:27 +06:00
Hirrolot
4530f935cb
Merge pull request #580 from teloxide/dialogue-get-chat-id
Implement `Dialogue::chat_id`
2022-04-07 18:44:45 +06:00
Hirrolot
12dbeea0f2 Update CHANGELOG.md 2022-04-07 18:37:53 +06:00
Hirrolot
c52325b788 Implement Dialogue::chat_id 2022-04-07 18:35:52 +06:00
Waffle Maybe
7abbd2dc09
Merge pull request #554 from teloxide/webhooks
Built-in webhook support
2022-04-07 16:31:26 +04:00
Hirrolot
e57f9fdc5f
Merge pull request #577 from teloxide/remove-need-for-cache-me
Remove the need for `CacheMe` in dispatcher
2022-04-07 18:25:10 +06:00
Maybe Waffle
bb7a4729c0 Remove the need for CacheMe in dispatcher 2022-04-05 17:19:10 +04:00
Maybe Waffle
f83ff59709 Fix issues caused by the rebase 2022-04-05 16:42:52 +04:00
Maybe Waffle
0bddb1d927 Update changelog 2022-04-05 16:37:22 +04:00
Maybe Waffle
62052a822a Remove unnecessary bounds
`UpdateListener::StopToken` is required to be `Send` anyway
2022-04-05 16:36:31 +04:00
Maybe Waffle
cf5cbe5a82 Add a workaround to stop webhook listener even when server is still run 2022-04-05 16:36:31 +04:00
Maybe Waffle
cca08ae43c Remove Option<> from webhooks::Options::drop_pending_updates 2022-04-05 16:36:31 +04:00
Maybe Waffle
7e44ab8c11 Add max_connections to the webhooks::Options 2022-04-05 16:36:31 +04:00
Maybe Waffle
4abafbcacc Write documentation for webhooks 2022-04-05 16:36:31 +04:00
Maybe Waffle
e951af7abe Fix ngrok_ping_pong example required-features
...and info! message
2022-04-05 16:36:31 +04:00
Maybe Waffle
2bdfcc9ca6 Move axum webhook impl into a sub-mod 2022-04-05 16:36:31 +04:00
Maybe Waffle
37d1252bc9 Use new built-in webhooks in ngrok example
I've also changed the port from 80 to 8443, since 80 usually requires
root privileges.
2022-04-05 16:36:22 +04:00
Maybe Waffle
d576d829f1 Allow using axum-based webhooks with existing server
Add `webhooks::{axum_to_router, axum_no_setup}` functions that allow for
more granular control over webhooks:
- `axum_to_router` - do not start the server, only setup webhook and
  return the components
- `axum_no_setup` same as `axum_to_touter` but also do not setup webhook

Also fix `StopToken` sendness.
2022-04-05 16:32:09 +04:00
Maybe Waffle
b86b2f67f3 Add built-in support for webhooks
This commit adds built-in support for webhooks based on the `axum`
framework under a new "webhooks-axum" feature.

API: `update_listeners::webhooks` module with `Options` (a common struct
that stores all webhook related settings) and `axum` (function that
implements webhook).
2022-04-05 16:32:06 +04:00
Waffle Maybe
038b5a1ae2
Merge pull request #575 from teloxide/WaffleLapkin-patch-42
change the link and wording about the vuln in the readme
2022-04-03 23:37:56 +04:00
Waffle Maybe
1e6bf831d8
change the link and wording about the vuln in the readme 2022-04-03 23:09:20 +04:00
Waffle Maybe
e66bd26d20
Merge pull request #573 from teloxide/update_teloxide_core
Release `0.7.3`
2022-04-03 16:29:18 +04:00
Maybe Waffle
99c8995bb3 Release 0.7.3 2022-04-03 16:19:17 +04:00
Hirrolot
140141f6fc
Merge pull request #572 from teloxide/beautify-string-literals
Capture identifiers in format strings
2022-04-03 03:35:56 -07:00
Hirrolot
5838b31834 Capture identifier in format strings (examples/) 2022-04-03 16:06:44 +06:00