Send out unset in event.

This commit is contained in:
Paul
2021-05-03 11:17:28 +01:00
parent b47067b311
commit fa960ebc94
5 changed files with 90 additions and 32 deletions

View File

@@ -30,6 +30,19 @@ pub enum ServerboundNotification {
EndTyping { channel: String },
}
#[derive(Serialize, Deserialize, Debug)]
pub enum RemoveUserField {
ProfileContent,
ProfileBackground,
StatusText,
Avatar
}
#[derive(Serialize, Deserialize, Debug)]
pub enum RemoveChannelField {
Icon
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(tag = "type")]
pub enum ClientboundNotification {
@@ -53,6 +66,8 @@ pub enum ClientboundNotification {
ChannelUpdate {
id: String,
data: JsonValue,
#[serde(skip_serializing_if = "Option::is_none")]
clear: Option<RemoveChannelField>
},
ChannelGroupJoin {
id: String,
@@ -77,6 +92,8 @@ pub enum ClientboundNotification {
UserUpdate {
id: String,
data: JsonValue,
#[serde(skip_serializing_if = "Option::is_none")]
clear: Option<RemoveUserField>
},
UserRelationship {
id: String,