Commit Graph

215 Commits

Author SHA1 Message Date
kozabrada123 50c4c1a542 Experimental heartbeats 2023-05-05 18:38:04 +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
kozabrada123 07e500d063 Update data for existing events 2023-05-05 15:46:45 +02:00
kozabrada123 0f4e623acd No need to serialize this 2023-05-05 15:39:11 +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
kozabrada123 f3f0619d3f Add basic event receiving 2023-05-04 20:57:45 +02:00
kozabrada123 f5502a8121 Add WebSocketConnection to Gateway 2023-05-04 20:05:33 +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 c2801acfdb
Remove unused imports 2023-05-03 21:06:01 +02:00
bitfl0wer fc5a053888
fix build fail by commenting out unused stuff 2023-05-03 21:05:09 +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 c6e6f34be3
add example threaded websocketconnection 2023-04-30 14:45:15 +02:00
bitfl0wer 76c4981cf8
Get GatewayHello from Stream 2023-04-30 12:17:35 +02:00
bitfl0wer 19a3e3af20
Add TLS support to WS connection 2023-04-30 11:56:14 +02:00
bitfl0wer 85913ce66d
Add types for Heartbeat and Hello (Gateway) 2023-04-30 11:48:53 +02:00
bitfl0wer 4956e44c0a
implement Gateway::new() 2023-04-28 23:21:55 +02:00
bitfl0wer 8cded33eda
Make GatewatIdentifyPayload pub 2023-04-28 20:30:03 +02:00
bitfl0wer 37ad29f698
Working on Gateway impl 2023-04-28 20:29:40 +02:00
bitfl0wer 82f1b3dcc1
Add Default derives to types 2023-04-28 18:18:32 +02:00
bitfl0wer 530c0deb36
Add documentation comments 2023-04-28 13:40:29 +02:00
bitfl0wer 29a7dba439
renamed mod to example 2023-04-28 12:39:58 +02:00
bitfl0wer 50b6029f54
Implement Observer for WebSocketEvents 2023-04-28 12:31:59 +02:00
bitfl0wer 8f97b48a09
Add error type for Observers 2023-04-27 22:38:57 +02:00
bitfl0wer 656acad356
Indicate that method call can fail 2023-04-27 22:38:41 +02:00
bitfl0wer 77ff7d6510
Update observer implementation 2023-04-27 22:29:07 +02:00
bitfl0wer 155a27d49d
start implementing ovserver 2023-04-27 17:57:10 +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 36b6be5788
Merge remote-tracking branch 'origin/main' into feature/gateway-observer 2023-04-25 18:00:44 +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 87d9d14047
Add dependencies 2023-04-25 17:21:27 +02:00
bitfl0wer 792a06f408
separate User and Instance limits. 2023-04-24 20:58:45 +02:00
bitfl0wer d9857180e9
Give each user their own rate limits 2023-04-24 19:51:35 +02:00
bitfl0wer c9d5bb8b6e
Merge remote-tracking branch 'origin/main' into improvement/update-rate-limiter-implementation 2023-04-24 19:50:36 +02:00
bitfl0wer 17eab8169e
Change HashMap<> to Limits 2023-04-24 19:49:26 +02:00
bitfl0wer 3e9aebf7ee
Implement Limits::new() and more logic 2023-04-24 19:38:42 +02:00
bitfl0wer eea118b623
Create internal User and API UserObject 2023-04-23 21:32:48 +02:00
bitfl0wer 2880097cb2
comment out test until spacebar pr is merged 2023-04-23 20:21:36 +02:00
bitfl0wer f3f70ba131
Implement Login 2023-04-23 20:11:14 +02:00
bitfl0wer fc4a0a4533
make compiler happy 2023-04-23 14:01:02 +02:00
bitfl0wer d9c82d5bfa
start working on login 2023-04-23 14:00:27 +02:00
bitfl0wer cfed349c03
Make send_request return Result 2023-04-23 13:58:17 +02:00
bitfl0wer 82bfec0612
Made test pass 2023-04-23 13:45:52 +02:00
bitfl0wer d1d8b6f237
Add documentation 2023-04-23 12:06:51 +02:00
bitfl0wer 1e00296dc9
Made AuthEmail, Password and Username reusable 2023-04-23 11:58:45 +02:00
bitfl0wer 2e52fb71d4
Register function with good errors! 2023-04-22 22:12:56 +02:00
bitfl0wer fbfa4fda94
push progress 2023-04-22 11:32:44 +02:00
bitfl0wer d67cedc847
Remove boilerplate errors 2023-04-21 23:20:23 +02:00
bitfl0wer b18e38a5fc
impl register 2023-04-21 18:20:57 +02:00
bitfl0wer 1418b67921
add error 2023-04-21 18:20:49 +02:00
bitfl0wer f96bcb87f6
Move custom errros to central file 2023-04-21 16:18:20 +02:00
bitfl0wer 552b43f80b
Replace Custom Error boilerplate with macro 2023-04-21 15:04:58 +02:00
bitfl0wer fff71f0529
create errors.rs 2023-04-21 14:30:10 +02:00
bitfl0wer 950eba2ae7
Add TODO 2023-04-21 14:30:03 +02:00
bitfl0wer ff6874abcb
Fix bad build 2023-04-21 14:27:56 +02:00
bitfl0wer 4f745c958c
Have AuthRegister and AbsoluteRegister cancel each other out 2023-04-20 20:11:12 +02:00
bitfl0wer 897df7adce
Change comment 2023-04-20 19:47:20 +02:00
bitfl0wer e43b3934e4
Improve limit check 2023-04-20 19:47:08 +02:00
bitfl0wer 27c111fd99
begin working on register 2023-04-20 00:14:11 +02:00
bitfl0wer 8666aa34e5
add users hashmap 2023-04-19 23:32:02 +02:00
bitfl0wer 9e10ce05a9
add await to fix test error 2023-04-19 20:58:14 +02:00
bitfl0wer bc3083bcf6
add additional documentation and TODO 2023-04-19 20:42:28 +02:00
bitfl0wer 33b5d6d57c
create new() method 2023-04-19 20:42:11 +02:00
bitfl0wer 1d25fdffcb
Include new file 2023-04-19 20:41:52 +02:00
bitfl0wer 32f1365a54
make progress on instance object creation 2023-04-19 20:41:33 +02:00
bitfl0wer f45193fc40
implement getting InstancePoliciesSchema
Co-authored-by: sky <skyrina@users.noreply.github.com>
2023-04-19 20:41:15 +02:00
bitfl0wer 7528a8eccd
remove token check, add username impl 2023-04-17 22:38:21 +02:00
bitfl0wer 38e3ee3afa
add Token struct and impl 2023-04-17 21:31:15 +02:00
bitfl0wer 0f424a9c53
start working on register 2023-04-16 23:03:24 +02:00
bitfl0wer 5e3fb77911
add gateway object 2023-04-16 23:03:12 +02:00
bitfl0wer 52c2bce5d3
use camel case 2023-04-16 22:50:51 +02:00
bitfl0wer 32ef8ee5b1
remove impl LoginSchema, add InstancePolicies 2023-04-16 22:18:51 +02:00
bitfl0wer d4bf540203
Add PartialEq and Eq derives 2023-04-16 22:16:39 +02:00
bitfl0wer 4b129ee6a3
Rename client to instance 2023-04-16 22:16:22 +02:00