Deprecate UserPresence event.
This commit is contained in:
@@ -157,10 +157,6 @@ pub enum ClientboundNotification {
|
|||||||
user: User,
|
user: User,
|
||||||
status: RelationshipStatus,
|
status: RelationshipStatus,
|
||||||
},
|
},
|
||||||
UserPresence {
|
|
||||||
id: String,
|
|
||||||
online: bool,
|
|
||||||
},
|
|
||||||
UserSettingsUpdate {
|
UserSettingsUpdate {
|
||||||
id: String,
|
id: String,
|
||||||
update: JsonValue,
|
update: JsonValue,
|
||||||
|
|||||||
@@ -129,9 +129,12 @@ async fn accept(stream: TcpStream) {
|
|||||||
send(payload);
|
send(payload);
|
||||||
|
|
||||||
if !was_online {
|
if !was_online {
|
||||||
ClientboundNotification::UserPresence {
|
ClientboundNotification::UserUpdate {
|
||||||
id: id.clone(),
|
id: id.clone(),
|
||||||
online: true,
|
data: json!({
|
||||||
|
"online": true
|
||||||
|
}),
|
||||||
|
clear: None
|
||||||
}
|
}
|
||||||
.publish(id);
|
.publish(id);
|
||||||
}
|
}
|
||||||
@@ -228,9 +231,12 @@ async fn accept(stream: TcpStream) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Some(id) = offline {
|
if let Some(id) = offline {
|
||||||
ClientboundNotification::UserPresence {
|
ClientboundNotification::UserUpdate {
|
||||||
id: id.clone(),
|
id: id.clone(),
|
||||||
online: false,
|
data: json!({
|
||||||
|
"online": false
|
||||||
|
}),
|
||||||
|
clear: None
|
||||||
}
|
}
|
||||||
.publish(id);
|
.publish(id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user