Deprecate UserPresence event.

This commit is contained in:
Paul
2021-07-27 14:22:41 +01:00
parent a5f7314f97
commit 2407d4da3a
2 changed files with 10 additions and 8 deletions

View File

@@ -157,10 +157,6 @@ pub enum ClientboundNotification {
user: User,
status: RelationshipStatus,
},
UserPresence {
id: String,
online: bool,
},
UserSettingsUpdate {
id: String,
update: JsonValue,

View File

@@ -129,9 +129,12 @@ async fn accept(stream: TcpStream) {
send(payload);
if !was_online {
ClientboundNotification::UserPresence {
ClientboundNotification::UserUpdate {
id: id.clone(),
online: true,
data: json!({
"online": true
}),
clear: None
}
.publish(id);
}
@@ -228,9 +231,12 @@ async fn accept(stream: TcpStream) {
}
if let Some(id) = offline {
ClientboundNotification::UserPresence {
ClientboundNotification::UserUpdate {
id: id.clone(),
online: false,
data: json!({
"online": false
}),
clear: None
}
.publish(id);
}