Ilya Bizyaev
146d42de37
Fix calculation of per-second used counts in throttling
...
This is not the cause of throttling issues that I was having, but
something I think is a bug from reading the code.
`history` is a deque that is kept sorted by the timestamp: old entries
are popped from the front, and new entries are pushed to the back. To
calculate `used` and `requests_sent.per_sec[chat]`, we want to count
entries from the past second, so the newest ones, so from the back.
For `take_while` to work as expected, it needs to be called on the
reverse iterator, as the regular iterator is front-to-back. Otherwise
`take_while` can finish early due to entries that are up to a minute
old.
2024-12-06 23:11:47 +01:00
hirrolot
666ef06ac5
Apply various stylistic fixes
2024-11-10 23:28:41 -05:00
LasterAlex
27f147fb0f
Env TELOXIDE_API_URL now can be used in Bot::from_env
2024-11-11 03:00:15 +02:00
YouKnow
fa08605c02
Merge branch 'master' into master
2024-10-20 02:29:04 +03:30
YouKnow
adb9830c93
Improve documentation and code comments
2024-10-20 02:26:18 +03:30
LasterAlex
4379f5a72f
Merge branch 'master' into fix-multipart-thread-id-serialization
2024-10-18 16:10:03 +03:00
LasterAlex
eee0a374e4
Fixed InlineQueryResultsButton serialization
2024-10-14 21:03:00 +03:00
LasterAlex
5434639cca
Fixed newtype serialization in multipart requests
2024-10-13 23:04:49 +03:00
Lewis Pearson
ebe89a637a
Update the teloxide-core
changelog
2024-10-05 18:15:42 -04:00
Ali
0f4ee3023a
fmt
2024-10-03 12:36:15 +03:30
Ali
dad067da44
removing useless Generic T on selective
, adding tests
2024-10-03 12:35:53 +03:30
LasterAlex
1f23983bfb
Changed Into to From
2024-09-23 01:36:07 +03:00
YouKnow
e96139634d
fixed clippy errors for rust nightly
2024-09-04 20:04:56 +03:30
LasterAlex
9f7d980a70
Removed multiple messages sugar functionality
2024-09-03 13:43:50 +03:00
LasterAlex
83b178c8ca
More types + some fixes
2024-08-30 09:37:00 +03:00
LasterAlex
578b665541
Added bot message sugar
2024-08-30 09:37:00 +03:00
LasterAlex
83f5508495
Cargo fmt
2024-08-30 09:15:28 +03:00
LasterAlex
a52fe8eeb5
Fixed Vec<MessageId> serialization
2024-08-30 09:10:25 +03:00
Tima Kinsart
55141db2ac
Link PR #1157 in the changelog
2024-08-28 21:52:19 -04:00
Johannes Dertmann
3977b79b90
Add BotKickedFromChannel variant to ApiError
2024-08-29 00:24:22 +02:00
Andrey Brusnik
181b30304f
Add dedicated Rgb
struct to replace [u8; 3]
2024-08-28 21:27:51 +04:00
Andrey Brusnik
76e2726803
Add MSRV and deps bumps to the changelogs
2024-08-24 18:46:04 +04:00
Andrey Brusnik
cd98dba17e
Bump MSRV to 1.80
2024-08-24 18:16:56 +04:00
Andrey Brusnik
ae20cf1f6b
Explicitly depend on tokio 1.39 and enable io-util
feature for tokio in teloxide-core
2024-08-24 18:16:56 +04:00
Andrey Brusnik
5d93b81ea0
Bump deps to: sqlx-0.8.1, tower-0.5.0, reqwest-0.12.7, ron-0.8.1, heck-0.5.0
2024-08-24 18:16:56 +04:00
jc
178db8a027
Update CHANGELOG.md
2024-08-24 18:02:56 +04:00
goostman-ai
7711677580
Merge branch 'teloxide:master' into master
2024-08-24 15:42:29 +02:00
jc
b15ba1d31a
Fix RON schema, prettify doc comments
2024-08-24 16:29:28 +04:00
Akshett Rai Jindal
32de39602d
Fix unstructured docs
2024-08-24 16:03:10 +05:30
Akshett Rai Jindal
f4fc11a011
Change id
type in BusinessConnection
to BusinessConnectionId
2024-08-24 16:02:42 +05:30
Akshett Rai Jindal
e10af95add
Mark BusinessConnectionId
as serde(transparent)
2024-08-24 15:36:55 +05:30
Akshett Rai Jindal
17b3807d3f
Use serde(flatten) for BusinessConnectionId
2024-08-24 15:29:52 +05:30
Akshett Rai Jindal
951c8f1438
Derive Default for BusinessIntro
, BusinessLocation
and BusinessOpeningHours
2024-08-24 15:15:19 +05:30
Akshett Rai Jindal
08d7d8f6b4
Move business_connection_id
from Message
to MessageCommon
2024-08-24 15:15:19 +05:30
Akshett Rai Jindal
cef553eeae
Add serde default to can_connect_to_business
in Me
2024-08-24 15:15:19 +05:30
Akshett Rai Jindal
21b164a416
Change some Option<bool> fields to bool in KeyboardButtonRequestUsers
2024-08-24 15:15:19 +05:30
Akshett Rai Jindal
ca5dddab54
Remove unecessary serde defaults and remove params from bool setters
2024-08-24 15:15:19 +05:30
Akshett Rai Jindal
31caa3ba04
Add more docs for business related structs
2024-08-24 15:15:19 +05:30
Akshett Rai Jindal
2f8e62f401
Use BusinessConnectionId
instead of String
for business_connection_id
fields and parameters
2024-08-24 15:15:19 +05:30
Akshett Rai Jindal
ccc2c68751
Update docs and changelogs
2024-08-24 15:15:18 +05:30
Akshett Rai Jindal
c9eec050d0
Wrap Public
variant of ChatKind
in Box
2024-08-24 15:14:19 +05:30
Akshett Rai Jindal
057a37cea0
Update CHANGELOG.md to add changes related to #1146
2024-08-24 15:14:16 +05:30
Akshett Rai Jindal
336ae4f646
Fix tests for 'full' features
2024-08-24 15:12:54 +05:30
Akshett Rai Jindal
5040813737
Bump TBA version
2024-08-24 15:12:54 +05:30
Akshett Rai Jindal
68b7aba836
Add method getBusinessConnection
2024-08-24 15:12:54 +05:30
Akshett Rai Jindal
7fe9278ce8
Add DeletedBusinessMessages
variant to UpdateKind
2024-08-24 15:12:54 +05:30
Akshett Rai Jindal
b15d85ec0a
Move BusinessOpeningHoursInterval
to separate file
2024-08-24 15:12:54 +05:30
Akshett Rai Jindal
f6c957182f
Add BusinessMessagesDeleted
struct
2024-08-24 15:12:54 +05:30
Akshett Rai Jindal
0efb15aa6a
Add EditedBusinessMessage
variant to UpdateKind
2024-08-24 15:12:54 +05:30
Akshett Rai Jindal
9e57d3acff
Add BusinessMessage
variant to UpdateKind
enum
2024-08-24 15:12:54 +05:30