Made all client enums public

Oops. Also I don't think I can flatten the message alongside the
signature as theoretically those are the bytes that are getting signed.
This commit is contained in:
2026-05-16 14:51:02 -07:00
parent 457469fda9
commit 87ae6e001b
+8 -3
View File
@@ -23,7 +23,11 @@ pub struct TaggedClientMessage {
pub struct SignedClientMessage {
message: ClientMessage,
// Should I enforce this being a ecdsa signature?
#[serde(with = "serde_bytes",flatten)]
// What is the signature of????
// Can I reserialize the message and check the signature that way??
// That would be very brittle but there isn't a good way to extract the
// bytes using serde. I'll write something better at some point
#[serde(with = "serde_bytes")]
signature: Box<[u8]>
}
@@ -175,15 +179,16 @@ pub enum ClientMessage {
}
#[derive(Serialize,Deserialize)]
enum ServerError {
pub enum ServerError {
InvalidPermission,
// Server can specify the required challenge
ChallengeInvitecode,
NotAuthenticated,
}
#[derive(Serialize,Deserialize)]
enum ServerMessage {
pub enum ServerMessage {
// Returned on fetch or naturally from subscribe
Messages(Vec<Message>),
MediaUploaded(Uuid),