Commit Graph

203 Commits

Author SHA1 Message Date
kozabrada123 be1a358bfd
Merge branch 'polyphony-chat:main' into main 2023-05-13 14:49:53 +00:00
kozabrada123 9f8ff96d1b Small changes for merging 2023-05-13 16:43:29 +02:00
bitfl0wer ce84251d31
Fix tests 2023-05-13 16:42:24 +02:00
bitfl0wer 35d081c649
update file to one that always exists, fix test 2023-05-13 16:40:34 +02:00
bitfl0wer d4568c998c
comment out view_nsfw_guilds to fix tests 2023-05-13 16:36:28 +02:00
kozabrada123 3cac8c18c0 Add a few more gateway events 2023-05-13 16:24:34 +02:00
kozabrada123 b8f649b04b Add rest of send events 2023-05-13 15:59:46 +02:00
kozabrada123 0e64946428 Deserialization error.. 2023-05-13 09:05:20 +02:00
kozabrada123 b6814a3b10
Merge branch 'polyphony-chat:main' into main 2023-05-13 06:11:07 +00:00
bitfl0wer 86b7ee22c8
Change visibility of attachments 2023-05-12 19:18:51 +02:00
bitfl0wer 6953dbb326
add set_id() to FileAttachment
This is so that the id of the Attachment to be sent can just be overwritten by the send() method.
2023-05-12 19:18:40 +02:00
bitfl0wer 7984c5d19f
Make attachment sending work! 2023-05-12 19:18:00 +02:00
kozabrada123 5ab07116ec
Merge branch 'polyphony-chat:main' into main 2023-05-12 11:41:53 +00:00
bitfl0wer 00acaf6de9
cargo fix 2023-05-12 12:35:06 +02:00
bitfl0wer eec54b4ca9
Change send to no longer take static refs 2023-05-12 12:34:27 +02:00
bitfl0wer 06d84af2db
Mark unused var as unused 2023-05-12 12:34:00 +02:00
bitfl0wer 70d7b005d9
impl PartialDiscordFileAttachment
Now contains move_$ methods, which can move individual values out of the PartialDiscordFileAttachment while preserving the rest of the object.
2023-05-12 12:33:39 +02:00
bitfl0wer 7eaa8a96b7
work on implementing message attachment sending 2023-05-11 23:35:36 +02:00
kozabrada123 4008d36763 Attempted reimpl 2023-05-11 22:47:31 +02:00
bitfl0wer 4c83e190b8
change message send impl 2023-05-11 22:36:35 +02:00
bitfl0wer d5048c2ebb
add a todo so i dont forget to not eat all ram 2023-05-11 00:07:45 +02:00
bitfl0wer 175d40209f
cool i have written a memory hog 2023-05-11 00:06:13 +02:00
bitfl0wer f42b3785f3
Change imports 2023-05-10 18:44:17 +02:00
bitfl0wer afb5745a74
Change register test 2023-05-10 18:44:10 +02:00
kozabrada123 9962dfdf81
Merge branch 'feature/gateway-observer' into main 2023-05-09 18:35:53 +00:00
bitfl0wer 38d9c3ad03
Change test_registration 2023-05-09 19:30:52 +02:00
bitfl0wer 8b09d16542
Make register and login return UserObject 2023-05-09 17:19:41 +02:00
bitfl0wer 478313507f
Extend UserObject to match with Spacebars' User 2023-05-09 17:19:23 +02:00
bitfl0wer d8c8cd079b
remove println 2023-05-09 17:19:04 +02:00
bitfl0wer 0ba2f568fd
impl get_settings() 2023-05-09 14:05:36 +02:00
bitfl0wer 5971ce1dbc
Make register and login return User 2023-05-09 14:05:03 +02:00
bitfl0wer 702cafc0f5
make token pub 2023-05-09 13:10:07 +02:00
bitfl0wer 11be031e98
Remove logged_in from User 2023-05-07 12:42:52 +02:00
bitfl0wer 54944fbb0e
Run clippy 2023-05-07 12:41:14 +02:00
bitfl0wer 8f3912c277
Remove unneccessary imports 2023-05-07 12:39:56 +02:00
bitfl0wer b2fa6db492
Remove lifetime from Instance (see below)
Originally, it was planned, that the Instance object would store Users. I have identified, that this was not needed, as it goes beyond the scope of a library; Users of this library are expected to keep track of users themselves. The removal of this user storage also prevented further overcomplications.
2023-05-07 12:39:04 +02:00
kozabrada123 ebab5d4433 Was still a merge conflict there 2023-05-07 12:05:58 +02:00
kozabrada123 f14b7c0e49 Fix merge conflict 2023-05-07 12:04:46 +02:00
bitfl0wer 50ecc78da0
add docs, add instance.get_user() 2023-05-07 11:54:49 +02:00
kozabrada123 d4a546efa3 Fix deserialization error 2023-05-07 11:47:12 +02:00
bitfl0wer 6b4251a3aa
Remove display impl, add default trait 2023-05-07 11:32:25 +02:00
bitfl0wer 014583216a
Impl user::get() function 2023-05-07 11:32:11 +02:00
bitfl0wer 45e8fe6953
add test fn 2023-05-07 00:18:21 +02:00
bitfl0wer c1bcd169f1
add users to mod.rs 2023-05-07 00:18:14 +02:00
bitfl0wer 621b05570a
remove nesting layer 2023-05-07 00:18:06 +02:00
bitfl0wer 222a552017
Add users to mod.rs 2023-05-07 00:17:54 +02:00
bitfl0wer 46a5f08b33
add pronouns 2023-05-06 22:47:31 +02:00
bitfl0wer eb131be83b
add mod.rs 2023-05-06 22:47:26 +02:00
bitfl0wer 0e5a9caa44
Implement message sending (without attachments) 2023-05-06 22:24:23 +02:00
bitfl0wer f067826889
change visibilities 2023-05-06 22:23:48 +02:00
bitfl0wer c3cab53804
impl SendMessageSchema 2023-05-06 22:23:34 +02:00
bitfl0wer b1b684e3b5
rename user rate_limits to limits for consistency 2023-05-06 18:52:24 +02:00
bitfl0wer 40bb3c38e9
Construct new message send method basics 2023-05-06 18:52:09 +02:00
bitfl0wer b041433865
change message to messagesendschema 2023-05-06 18:34:38 +02:00
kozabrada123 1f8a38545b Update types to fix deserialization errors 2023-05-06 10:39:16 +02:00
kozabrada123 8414bbb1c2 Fixed instance lifetime parameter 2023-05-05 22:46:00 +02:00
kozabrada123 bc3e93ce5a Readd gateway to instance 2023-05-05 22:04:57 +02:00
bitfl0wer fa0d74e9dd
remove redundant code 2023-05-05 22:00:37 +02:00
bitfl0wer bae45254fe
start re-doing send() 2023-05-05 21:53:23 +02:00
bitfl0wer 1076c23403
Add DiscordFileAttachment, change visibilities 2023-05-05 21:53:00 +02:00
bitfl0wer 7a8eedd4c0
Add MessageSendSchema 2023-05-05 21:52:27 +02:00
kozabrada123 18590ff075 Fix encoding wrong 2023-05-05 20:58:00 +02:00
kozabrada123 4446aef8e1 Update integers on some types 2023-05-05 18:37:52 +02:00
kozabrada123 c57122a94b Add gateway Ready event 2023-05-05 16:08:12 +02:00
bitfl0wer cdc3836177
handle attachment-messages seperately 2023-05-05 14:38:37 +02:00
bitfl0wer e749251529
change name type from String to i16 2023-05-05 14:38:22 +02:00
bitfl0wer 2940b50f1b
Fix counter not being incremented 2023-05-05 14:19:38 +02:00
bitfl0wer 164bd627b0
Change HashMap to Map
Filenames can be non-unique, which could not be accurately represented using a HashMap.
2023-05-05 14:18:59 +02:00
bitfl0wer 5bf09a997c
Add new() DiscordFileAttachment 2023-05-05 14:16:09 +02:00
bitfl0wer fb6e0a21ec
Rename File to DiscordFileAttachment, work on that 2023-05-04 23:00:48 +02:00
bitfl0wer dcee25a2a2
Add bearer auth for message sending 2023-05-03 23:13:12 +02:00
bitfl0wer ab17d864ba
Add start of attachments implementation 2023-05-03 23:04:32 +02:00
bitfl0wer 66ab87db30
Merge remote-tracking branch 'origin/feature/sending-messages' 2023-05-03 17:39:57 +02:00
bitfl0wer 809702bc1d
change reference to be mutable 2023-05-03 17:29:32 +02:00
bitfl0wer 98bf70ec5e
add send_message to user 2023-05-03 17:29:20 +02:00
bitfl0wer 5e399dba26
Add get_as_mut to Limits 2023-05-03 17:12:32 +02:00
bitfl0wer 94fa84cabe
Remove blank line 2023-05-03 17:12:23 +02:00
bitfl0wer d216ef6179
change visibilities to pub 2023-05-03 17:11:48 +02:00
bitfl0wer 685fe3ff1a
cargo clippy --fix 2023-05-03 16:38:42 +02:00
bitfl0wer 7445f1efc7
Add lifetime to Instance 2023-05-03 16:37:10 +02:00
bitfl0wer 13815e73a1
Add Message send() 2023-05-03 16:27:04 +02:00
bitfl0wer 375ea3e035
Start working on message send body 2023-05-03 15:55:01 +02:00
bitfl0wer f1aef5df02
Add message.rs 2023-05-03 15:45:07 +02:00
Flori dc57ef7fc5
Merge pull request #25 from polyphony-chat/feature/sending-messages
Bring main up to date
2023-05-02 22:51:49 +02:00
bitfl0wer 6015afd49b
Add messages.rs to implement messages features 2023-05-02 22:46:41 +02:00
bitfl0wer eb98f1374c
add GatewayPayload 2023-04-30 21:54:15 +02:00
bitfl0wer 85913ce66d
Add types for Heartbeat and Hello (Gateway) 2023-04-30 11:48:53 +02:00
bitfl0wer 8cded33eda
Make GatewatIdentifyPayload pub 2023-04-28 20:30:03 +02:00
bitfl0wer 82f1b3dcc1
Add Default derives to types 2023-04-28 18:18:32 +02:00
bitfl0wer 50b6029f54
Implement Observer for WebSocketEvents 2023-04-28 12:31:59 +02:00
bitfl0wer 8a7d61804f
add GatewayResume 2023-04-25 23:06:16 +02:00
bitfl0wer 534d32b1bc
add more types 2023-04-25 22:34:43 +02:00
bitfl0wer dee8c0bb4e
add typing start event 2023-04-25 22:08:09 +02:00
bitfl0wer b8cc81d8c1
Add more Types 2023-04-25 22:03:25 +02:00
bitfl0wer 48add97e79
metric ton of types for message deserialization 2023-04-25 21:42:46 +02:00
bitfl0wer c7afd81d80
Fix error due to deletion of impl::Display 2023-04-25 21:42:11 +02:00
bitfl0wer 7cb77bae0f
Improve readability 2023-04-25 17:41:14 +02:00
bitfl0wer 9dad307b71
Improve readability 2023-04-25 17:33:35 +02:00
bitfl0wer e52a646054
Split up schemas.rs 2023-04-25 17:32:30 +02:00
bitfl0wer 792a06f408
separate User and Instance limits. 2023-04-24 20:58:45 +02:00