Commit Graph

971 Commits

Author SHA1 Message Date
bitfl0wer 98b129aca0
Provide alternative implementations for PartialEq for some types when sqlx feature is enabled 2024-07-20 17:18:23 +02:00
bitfl0wer 491cd255de
Add one BILLION derives 2024-07-18 23:04:35 +02:00
bitfl0wer ebcb6b65e4
Fix voice, voice_udp features 2024-07-13 14:53:04 +02:00
bitfl0wer 7554f90187
Replace `Observer` and `GatewayEvent` with `pubserve` crate 2024-07-13 14:28:22 +02:00
Flori 484c69229d
No openssl (#522)
* Remove openssl from some packages' deps

* Add shorthand wasm build script

* Eliminate openssl dependency from crate

* Build RootCertStore from webpki roots instead of native roots

* Expand wasm documentation

* Revert reqwest

* Lock reqwest at 0.11.23

* Lock reqwest at 0.11.26, latest possible version

* Add wasm test script
2024-07-13 08:31:45 +02:00
kozabrada123 743f106ec6
Miscellaneous fixes (#514)
- fix `PATCH /users/@me` - It incorrectly returned a required password error, even if the current password was set
- fix `GET /users/@me/guilds` - It incorrectly sent body parameters instead of query ones
- don't log debug! for every successful ratelimited request - use trace! so it's less spamy
- update the max expected compression ratio (several times) from 20 to 200. let's hope that will be enough
- fix deserialization errors relating to guild folders in user settings
- fix a panic in `SqlxBitFlags` if there are extra flags. It now truncates them
- update `chorus_macros` to 0.4.1 (due to the above fix)
- log (trace!) event data if we fail to parse it or it's unrecognised, for debugging purposes
- fix a deserialization error in the `MessageACK` event
- fix `public_flags` in user objects not being `PublicFlags` bitflags
2024-06-28 14:05:59 +02:00
Quat3rnion d59161619c
Add custom deserializer for PermissionOverwriteType (#512)
* Add custom deserializer for PermissionOverwriteType
2024-06-27 20:36:39 +02:00
Quat3rnion 39e7f89c78
Backend/guilds (#509)
* Fix SQL encode/decode for GuildFeatures

* Use distinct PermissionFlags type

* Add Emoji schema types, modify GuildBan with feature lock

* Add Schemas for pruning guild members

* Add schemas for interfacing with stickers backend routes

* Add schemas for interfacing with vanity-url backend routes

* Add schema for interfacing with guilds/id/welcome-screen route

* Make all Option<Vec> types Vec types with #[serde(default)]

* Add various types to support guilds/* api routes

* Add missing enums and structs for searching messages

* Use proper distinct types

* Add EmbedType enum

* Use distinct PermissionFlags type

* Changes supporting backend for VoiceState

* Changes supporting backend for AuditLog's
2024-06-27 08:45:51 +02:00
kozabrada123 89333d6353
Implement gateway options, zlib-stream compression (#508)
* feat: add GatewayOptions

* feat: implement zlib-stream compression

This also changes how gateway messages work.
Now each gateway backend converts its message into an
intermediary RawGatewayMessage, from which we inflate
and parse GatewayMessages.

Thanks to ByteAlex and their zlib-stream-rs crate, which
helped me understand how to parse a compressed websocket stream
2024-06-23 17:23:13 +02:00
Quat3rnion b4a8082f29
Update and add some types in support of the backend (#507) 2024-06-19 19:59:39 +02:00
kozabrada123 4430a7c4e6
Fix deserialization error w/ guild features list 2024-06-18 17:18:20 +02:00
Quat3rnion a8b7d9dfb3 u8 -> u64 2024-06-18 10:07:56 -04:00
Quat3rnion e553d10f25 Add new SerdeBitFlags derive macro, to help reduce repetitive code 2024-06-18 10:04:00 -04:00
Quat3rnion c9a36ce725 Maybe fix tests, make UserFlags able to be deserialized from String or u64 2024-06-18 08:46:07 -04:00
Quat3rnion d7de1d2fb7 Fix compilation for real, no dirty hack 2024-06-18 05:46:27 -04:00
Quat3rnion abc4608be5 Dirty hack 2024-06-18 05:32:27 -04:00
Quat3rnion 77004abcfa Feature lock the macro 2024-06-18 05:24:42 -04:00
Quat3rnion 06b4dc3abd forgot a file :( 2024-06-18 05:19:51 -04:00
Quat3rnion 3810170400 Remove unused imports, feature locks in macro 2024-06-18 05:14:28 -04:00
Quat3rnion dfffcf4313 Add forgotten feature locks 2024-06-18 05:09:00 -04:00
Quat3rnion bec0269e70 Add partial emoji and custom reaction types, refine SQLx mapping 2024-06-17 15:22:58 -04:00
Quat3rnion 590a6d6828 Make UserFlags deserialize from string 2024-06-07 14:08:47 -04:00
Quat3rnion d3e2ef947c Add distinct MessageType enum 2024-06-07 13:14:25 -04:00
Quat3rnion d89975819a Utilize new macros and use distinct Flag types 2024-06-07 13:13:27 -04:00
Quat3rnion 96c3f53961 Merge branch 'dev' into backend/messages 2024-06-07 13:00:04 -04:00
Quat3rnion ed5365ade4 Fix inverted type wrapping 2024-06-07 02:08:41 -04:00
Quat3rnion 0468292ec6 Add type locks 2024-06-07 02:08:21 -04:00
Quat3rnion 83a8f080b7
Update docs aesthetics
Co-authored-by: kozabrada123 <59031733+kozabrada123@users.noreply.github.com>
2024-06-07 00:46:53 -04:00
Quat3rnion a0cddbf3ae Fix compile error 2024-06-05 21:10:29 -04:00
Quat3rnion 556fbb9ded Add forgotten import and pub use. 2024-06-05 14:50:38 -04:00
Quat3rnion eb87bd6ffc Add `GetInvitesSchema` 2024-06-05 14:50:10 -04:00
Quat3rnion 5110e9bfdb Implement `From<Guild> for InviteGuild` 2024-06-05 14:49:34 -04:00
Quat3rnion c8bde0c9ec Use distinct types in `InviteGuild` object. 2024-06-05 14:49:17 -04:00
Quat3rnion 0d01536f59 Remove double bound for E 2024-06-05 00:46:29 -04:00
Quat3rnion c34b1da8d0 Add InviteFlags::VIEWED 2024-06-04 23:53:21 -04:00
Quat3rnion 0f1e693d60 Clear warnings 2024-06-04 23:45:22 -04:00
Quat3rnion cab4cb1ce6 Write custom serialize/deserialize impl's for InviteFlags 2024-06-04 23:43:12 -04:00
Quat3rnion 9f281879a9 Update derive for backend/sqlx compatibility. 2024-06-04 22:24:28 -04:00
Quat3rnion 450aa9f440 Update fields for backend/sqlx compatibility. 2024-06-04 22:24:03 -04:00
Quat3rnion 133b03f1c8 Use distinct type `DefaultReaction` 2024-06-04 22:22:39 -04:00
Quat3rnion 6c1493f362 Add sqlx Type, Encode, Decode impl for InviteFlags bitflag object. 2024-06-04 22:21:48 -04:00
Quat3rnion c96dcd5c33 Distinguish InviteType and InviteTargetType 2024-06-04 22:19:48 -04:00
Quat3rnion 0bf5091f3c Fix oversight for premium_since 2024-06-04 13:35:28 -04:00
Quat3rnion cb905d0a83 Expand documentation to explain facade type 2024-06-04 13:34:58 -04:00
Quat3rnion 0c9e9cf367 clear warnings 2024-06-04 13:01:51 -04:00
Quat3rnion 32677b8cd9 actually fix linux tests 2024-06-04 13:01:51 -04:00
Quat3rnion 2db91e8538 Fix errors in documentation tests 2024-06-04 13:01:51 -04:00
Quat3rnion fcda4cc2ca Remove final usages of erroneous serde impl 2024-06-04 13:01:51 -04:00
Quat3rnion 119a09ae88 Revert c4452132 2024-06-04 00:38:59 -04:00
Quat3rnion 2b4e9fa149 Remove unused imports 2024-06-04 00:38:49 -04:00