Commit Graph

68 Commits

Author SHA1 Message Date
bitfl0wer 43a692b37a
Use ws_stream_wasm fork 2023-11-18 15:27:22 +01:00
bitfl0wer cda9bd35b0
Move ws_stream_wasm to shared dependencies
Avoids conditional compiling bug i haven't yet fully found out. See:
https://cloud.bitfl0wer.de/s/KEcZs7PtQ3JZo8x
2023-11-16 16:28:55 +01:00
bitfl0wer 3f66006a45
Merge branch 'main' into feature/wasm32-unknown 2023-11-14 16:30:24 +01:00
Flori bd8bf80fde
Bump version 2023-11-14 16:02:51 +01:00
Flori ff504b454c
Manually bump tungstenite to 0.20.1 in cargo.toml 2023-11-14 12:33:12 +01:00
bitfl0wer 1450546429
Replace tokio::time with safina-timer 2023-11-13 19:20:38 +01:00
bitfl0wer cafd645dd3
Use patched reqwest with multipart-headers support 2023-11-13 17:34:16 +01:00
bitfl0wer 3124c452d8
Include `rand` crate in all targets 2023-11-13 15:38:20 +01:00
bitfl0wer 5fff060f4b
remove sqlx from wasm-exclusion, add futures-timer 2023-11-13 15:29:37 +01:00
bitfl0wer 6ad5a5851f
compile-lock most wasm32 incompatibilities 2023-11-13 13:55:55 +01:00
bitfl0wer 15b5eab08c
Format changes 2023-11-13 12:57:17 +01:00
bitfl0wer b0b9729662
+ ws_stream_wasm, - dev-dependency on tokio/full 2023-11-13 12:43:00 +01:00
bitfl0wer cc252ddefc
HOTFIX: remove openssl, like it was intended 2023-11-12 18:04:47 +01:00
bitfl0wer c67ce5cc2d
Remove openssl-dependency fully 2023-11-12 18:04:15 +01:00
bitfl0wer 88958b1a2b
Bump version for chorus 2023-11-12 17:41:59 +01:00
bitfl0wer 57a83bdd88
Remove openssl, use rustls and rand instead 2023-11-12 17:20:32 +01:00
bitfl0wer a8496548d9
Add source url field trait 2023-09-03 21:00:48 +02:00
bitfl0wer 11e949c824
Make Errors Hash and Eq, bump version 2023-09-03 16:55:19 +02:00
bitfl0wer 58284aeaaa
Bugfix time 2023-09-01 15:02:57 +02:00
bitfl0wer 82cc1ff0ea
Bump version 2023-09-01 13:02:11 +02:00
bitfl0wer 665ebfa4fe
Bump version 2023-09-01 00:49:42 +02:00
fowb 6b35b3ee56 Bump Version 2023-08-30 15:29:14 +02:00
bitfl0wer cf9bd6328e
Bump version 2023-08-29 14:45:10 +02:00
bitfl0wer dcf2809678
Fix typo 2023-08-29 00:08:59 +02:00
bitfl0wer bdd6e9b5dd
Bump version 2023-08-29 00:06:17 +02:00
Flori f313b8af81
Update Cargo.toml 2023-08-28 18:23:30 +02:00
bitfl0wer f296a900c0
Bump version to 0.2 2023-08-28 12:39:16 +02:00
bitfl0wer 07538cb2c7
Add website 2023-08-27 12:49:58 +02:00
bitfl0wer 306e27c1c2
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 5d114c7412
Bump chorus-macros deps 2023-08-27 01:00:41 +02:00
bitfl0wer ac9e36d874
Bump chorus-macros deps 2023-08-27 00:59:22 +02:00
bitfl0wer 4e6d299a4d
Bump dependencies 2023-08-27 00:51:52 +02:00
bitfl0wer 82ac88e911
replace sqlx-git-custom with sqlx 2023-08-27 00:11:11 +02:00
bitfl0wer 2fa3216c24
Add json feature to reqwest 2023-08-22 19:22:30 +02:00
bitfl0wer 1bb91251f5
Add rc feature to serde 2023-08-02 20:17:36 +02:00
SpecificProtagonist 24450571de
derive Updateable (#167) 2023-07-22 11:20:31 +02:00
SpecificProtagonist f97d26bc6c
Fix gateway heartbeat blocking (#162)
fix gateway heartbeat blocking
2023-07-21 13:59:40 +02:00
Flori 9953d9e299
Bump crate versions (#158) 2023-07-17 20:06:57 +02:00
Zert3x d5979e0024
Async Observer Trait (#147) 2023-07-11 19:20:27 +02:00
Flori 8c9ccdd997
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 ce359103da Use log instead of prints 2023-07-01 19:29:50 +02:00
Vincent Junge 1b1aa564d2
fixed tokio features 2023-06-24 08:52:45 +02:00
Vincent Junge 29fcdfe641
simplyfy Snowflake 2023-06-20 12:21:22 +02:00
bitfl0wer 5732f1119f
Add rusty-hook for pre-push cargo fmt 2023-05-28 00:52:11 +02:00
kozabrada123 f54e750f74 Add options with empty string for identify props 2023-05-27 19:55:57 +02:00
kozabrada123 a26ded8ab2
Merge branch 'main' into feature/full-gateway-coverage 2023-05-27 19:23:27 +02:00
kozabrada123 013943791b Types refactor merged 2023-05-26 19:36:41 +02:00
Zertex bb7b7a57e3 Use patched version of sqlx 2023-05-26 13:02:07 -04:00
Zertex 351d0ae6d2 Make client feature default 2023-05-26 10:16:24 -04:00
Zertex e0518db6a9 Add features to Cargo.toml 2023-05-26 10:09:55 -04:00