diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d4b14..ee635f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Procedure when bumping the version number: - `bot::instance::Instance` now implements `Clone` ### Fixed +- **(breaking)** Deserializing empty events and replies by turning unit structs into empty structs - `phone` and `mobile` emoji - Instances getting stuck in "Connecting" state diff --git a/src/api/account_cmds.rs b/src/api/account_cmds.rs index 6a39db6..01ef7f0 100644 --- a/src/api/account_cmds.rs +++ b/src/api/account_cmds.rs @@ -56,7 +56,7 @@ pub struct ChangePassword { /// Return the outcome of changing the password. #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct ChangePasswordReply; +pub struct ChangePasswordReply {} /// Attempt to log an anonymous session into an account. /// @@ -99,11 +99,11 @@ pub struct LoginReply { /// [`DisconnectEvent`](super::DisconnectEvent) shortly after. The next /// connection the client makes will be a logged out session. #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct Logout; +pub struct Logout {} /// Confirm a logout. #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct LogoutReply; +pub struct LogoutReply {} /// Create a new account and logs into it. /// @@ -146,11 +146,11 @@ pub struct RegisterAccountReply { /// An error will be returned if the account has no unverified email addresses /// associated with it. #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct ResendVerificationEmail; +pub struct ResendVerificationEmail {} /// Indicate that a verification email has been sent. #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct ResendVerificationEmailReply; +pub struct ResendVerificationEmailReply {} /// Generate a password reset request. /// @@ -164,4 +164,4 @@ pub struct ResetPassword { /// Confirm that the password reset is in progress. #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct ResetPasswordReply; +pub struct ResetPasswordReply {} diff --git a/src/api/events.rs b/src/api/events.rs index a80a49d..8abe04d 100644 --- a/src/api/events.rs +++ b/src/api/events.rs @@ -68,7 +68,7 @@ pub struct LoginEvent { /// Sent to all sessions of an agent when that agent is logged out (except for /// the session that issued the logout command). #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct LogoutEvent; +pub struct LogoutEvent {} /// Indicates some server-side event that impacts the presence of sessions in a /// room. diff --git a/src/api/room_cmds.rs b/src/api/room_cmds.rs index bb60e0a..0a2d553 100644 --- a/src/api/room_cmds.rs +++ b/src/api/room_cmds.rs @@ -110,7 +110,7 @@ pub struct SendReply(pub Message); /// Request a list of sessions currently joined in the room. #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct Who; +pub struct Who {} /// Lists the sessions currently joined in the room. #[derive(Debug, Clone, Serialize, Deserialize)]