message: chore: Add Version 0 conversion for RequestServerInfo
  The Spec Version 0 of RequestServerInfo is missing the
  message_version. We can just keep conversion optional and default to 0
  to fix that.
  Affects
diff: @@ -16,7 +16,9 @@ pub struct RequestServerInfo {
  pub(super) id: u32,
  #[cfg_attr(feature = "serialize_json", serde(rename = "ClientName"))]
  pub client_name: String,
  - #[cfg_attr(feature = "serialize_json", serde(rename = "MessageVersion"))]
  + // Default for this message is set to 0, as this field didn't exist in the
  + // first version of the protocol.
  + #[cfg_attr(feature = "serialize_json", serde(rename = "MessageVersion"), serde(default))]
  pub message_version: u32,
  }
  @@ -29,3 +31,43 @@ impl RequestServerInfo {
  }
  }
  }
  +
  +#[cfg(test)]
  +mod test {
  + use super::RequestServerInfo;
  +
  + #[cfg(feature = "serialize_json")]
  + #[test]
  + fn test_request_server_info_version1_json_conversion() {
  + let new_json = r#"
  +{
  + "Id": 1,
  + "ClientName": "Test Client",
  + "MessageVersion": 2
  +}
  + "#;
  + let new_msg = RequestServerInfo {
  + id: 1,
  + client_name: "Test Client".to_owned(),
  + message_version: 2
  + };
  + assert_eq!(serde_json::from_str::<RequestServerInfo>(new_json).unwrap(), new_msg);
  + }
  +
  + #[cfg(feature = "serialize_json")]
  + #[test]
  + fn test_request_server_info_version0_json_conversion() {
  + let old_json = r#"
  +{
  + "Id": 1,
  + "ClientName": "Test Client"
  +}
  + "#;
  + let old_msg = RequestServerInfo {
  + id: 1,
  + client_name: "Test Client".to_owned(),
  + message_version: 0
  + };
  + assert_eq!(serde_json::from_str::<RequestServerInfo>(old_json).unwrap(), old_msg);
  + }
  +}
  \ No newline at end of file
  