Commit Graph

105 Commits

Author SHA1 Message Date
bitfl0wer c3d6937171 Remove openssl-dependency fully 2023-11-12 18:04:15 +01:00
bitfl0wer 279ac9d8ca Bump version for chorus 2023-11-12 17:41:59 +01:00
bitfl0wer 2f559b1397 Remove openssl, use rustls and rand instead 2023-11-12 17:20:32 +01:00
bitfl0wer 7938f0295e Add source url field trait 2023-09-03 21:00:48 +02:00
bitfl0wer db533f9700 Make Errors Hash and Eq, bump version 2023-09-03 16:55:19 +02:00
bitfl0wer 47ba03102c Bugfix time 2023-09-01 15:02:57 +02:00
bitfl0wer 635361a417 Bump version 2023-09-01 13:02:11 +02:00
bitfl0wer c9c222664d Bump version 2023-09-01 00:49:42 +02:00
fowb b949477b24 Bump Version 2023-08-30 15:29:14 +02:00
bitfl0wer 8c45355620 Bump version 2023-08-29 14:45:10 +02:00
bitfl0wer 560a0d8fd8 Fix typo 2023-08-29 00:08:59 +02:00
bitfl0wer 387991c605 Bump version 2023-08-29 00:06:17 +02:00
Flori 60aa559e6d Update Cargo.toml 2023-08-28 18:23:30 +02:00
bitfl0wer 54f907b12e Bump version to 0.2 2023-08-28 12:39:16 +02:00
bitfl0wer f8c7fc84c4 Add website 2023-08-27 12:49:58 +02:00
bitfl0wer 033c8c6a6f Merge branch 'enhancement/bump-deps' of https://github.com/polyphony-chat/chorus into enhancement/bump-deps 2023-08-27 01:11:52 +02:00
bitfl0wer 3f829246ab Bump chorus-macros deps 2023-08-27 01:00:41 +02:00
bitfl0wer 2e4abb468a Bump chorus-macros deps 2023-08-27 00:59:22 +02:00
bitfl0wer a8769ffca6 Bump dependencies 2023-08-27 00:51:52 +02:00
bitfl0wer 558232c1a2 replace sqlx-git-custom with sqlx 2023-08-27 00:11:11 +02:00
bitfl0wer c8378083cf Add json feature to reqwest 2023-08-22 19:22:30 +02:00
bitfl0wer 917f1cfb0d Add rc feature to serde 2023-08-02 20:17:36 +02:00
SpecificProtagonist 9ebe72a7dc derive Updateable (#167) 2023-07-22 11:20:31 +02:00
SpecificProtagonist 776efce4dc Fix gateway heartbeat blocking (#162)
fix gateway heartbeat blocking
2023-07-21 13:59:40 +02:00
Flori df08bc33ac Bump crate versions (#158) 2023-07-17 20:06:57 +02:00
Zert3x 0d6d705e46 Async Observer Trait (#147) 2023-07-11 19:20:27 +02:00
Flori 69b7c2445c Ratelimiter overhaul (#144)
* Rename limits and limit to have better names

* Remove empty lines

* Remove handle_request (moved to requestlimiter)

* Start working on new ratelimiter

* Make limits Option, add "limited?" to constructor

* Add missing logic to send_request

* Rename Limits

* Create Ratelimits and Limit Struct

* Define Limit

* Import Ratelimits

* Define get_rate_limits

* Remove unused import

* + check_rate_limits & limits_config_to_ratelimits

* Remove Absolute Limits
These limits are not meant to be tracked anyways.

* add ratelimits is_exhausted

* Add error handling and send request checking

* change limits to option ratelimits

* Add strum

* Change Ratelimits to Hashmap

* Remove ratelimits in favor of hashmap

* Change code from struct to hashmap

* start working on update rate limits

* Remove wrong import

* Rename ChorusLibError to ChorusError

* Documented the chorus errors

* Made error documentation docstring

* Make ReceivedErrorCodeError have error string

* Remove unneeded import

* Match changes in errors.rs

* Improve update_rate_limits and can_send_request

* add ratelimits.to_hash_map()

* use instances' client instead of new client

* add LimitsConfiguration to instance

* improve update_limits, change a method name

* Fix un-updated errors

* Get LimitConfiguration in a sane way

* Move common.rs into ratelimiter::ChorusRequest

* Delete common.rs

* Make instance.rs use overhauled errors

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* update ratelimiter implementation across all files

* Fix remaining errors post-refactor

* Changed Enum case to be correct

* Use result

* Re-add missing body to request

* Remove unneeded late initalization

* Change visibility from pub to pub(crate)
I feel like these core methods don't need to be exposed as public API.

* Remove unnecessary import

* Fix clippy warnings

* Add docstring

* Change Error names across all files

* Update Cargo.toml

Strum is not needed

* Update ratelimits.rs

* Update ratelimits.rs

* Bug/discord instance info unavailable (#146)

* Change text to be more ambigous

* Use default Configuration instead of erroring out

* Emit warning log if instance config cant be gotten

* Remove import

* Update src/instance.rs

Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>

* Add missing closing bracket

* Put limits and limits_configuration as one struct

* Derive Hash

* remove import

* rename limits and limits_configuration

* Save clone call

* Change LimitsConfiguration to RateLimits
`LimitsConfiguration` is in no way related to whether the instance has API rate limits enabled or not. Therefore, it has been replaced with what it should have been all along.

* Add ensure_limit_in_map(), add `window` to `Limit`

* Remove unneeded var

* Remove import

* Clean up unneeded things
Dead code warnings have been supressed, but flagged as FIXME so they don't get forgotten. Anyone using tools like TODO Tree in VSCode can still see that they are there, however, they will not be shown as warnings anymore

* Remove nested submodule `limit`

* Add doc comments

* Add more doc comments

* Add some log messages to some methods

---------

Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-09 18:38:02 +02:00
kozabrada123 3f6d0e2d9d Use log instead of prints 2023-07-01 19:29:50 +02:00
Vincent Junge c0d484efdc fixed tokio features 2023-06-24 08:52:45 +02:00
Vincent Junge f9619dde8d simplyfy Snowflake 2023-06-20 12:21:22 +02:00
bitfl0wer 05940b0e9e Add rusty-hook for pre-push cargo fmt 2023-05-28 00:52:11 +02:00
kozabrada123 262365e23f Add options with empty string for identify props 2023-05-27 19:55:57 +02:00
kozabrada123 12a04e866a Merge branch 'main' into feature/full-gateway-coverage 2023-05-27 19:23:27 +02:00
kozabrada123 63e67f64fd Types refactor merged 2023-05-26 19:36:41 +02:00
Quaternion 87cd46a59b Use patched version of sqlx 2023-05-26 13:02:07 -04:00
Quaternion e029a4c5d0 Make client feature default 2023-05-26 10:16:24 -04:00
Quaternion 1c06ce7246 Add features to Cargo.toml 2023-05-26 10:09:55 -04:00
Quaternion 0450c27fbf Serde_repr on ChannelType 2023-05-26 09:58:13 -04:00
bitfl0wer 48113825b8 Integrate polyphony-types into chorus 2023-05-25 21:11:08 +02:00
kozabrada123 73a9e5b0fc Merge branch 'main' 2023-05-22 13:30:19 +02:00
bitfl0wer 0847821f5e Create integration.rs, is broken right now 2023-05-20 21:04:03 +02:00
kozabrada123 50fb208023 Update dependencies, deserialize errors 2023-05-20 08:39:02 +02:00
kozabrada123 f33411e6c3 Solve deserialization problem semi optimally 2023-05-17 18:16:47 +02:00
kozabrada123 262cd0e780 Add more events, fix deserialization errors 2023-05-14 08:20:25 +02:00
kozabrada123 41b75be2fb Add a few more gateway events 2023-05-13 16:24:34 +02:00
bitfl0wer fe63d11055 cool i have written a memory hog 2023-05-11 00:06:13 +02:00
bitfl0wer 24483f7194 Add multipart feature 2023-05-05 14:38:05 +02:00
bitfl0wer f565cf8366 implement Gateway::new() 2023-04-28 23:21:55 +02:00
bitfl0wer 34ba59d0e5 add rt-multi-thread feature 2023-04-28 20:30:31 +02:00
bitfl0wer 496305f091 Add dependencies 2023-04-25 17:21:27 +02:00
bitfl0wer 1c2a60613b Replace Custom Error boilerplate with macro 2023-04-21 15:04:58 +02:00
bitfl0wer 6cba2f93e1 Added email regex validation and tests 2023-04-16 14:09:23 +02:00
bitfl0wer cf27f14645 Add tokio and serde features 2023-04-10 14:18:17 +02:00
bitfl0wer c72ddba9e2 add chrono as it will be needed for epoch time 2023-04-07 21:01:21 +02:00
bitfl0wer 93dc9f3197 cargo init 2023-04-04 16:42:20 +02:00