user active app reporting

This commit is contained in:
2026-01-26 11:16:55 +08:00
parent 76943f3362
commit 0b1686653c
10 changed files with 224 additions and 2 deletions

View File

@@ -174,3 +174,18 @@ pub fn on_friend_active_doll_changed(payload: Payload, _socket: RawClient) {
_ => error!("Received unexpected payload format for friend-active-doll-changed"),
}
}
pub fn on_friend_user_status(payload: Payload, _socket: RawClient) {
match payload {
Payload::Text(values) => {
if let Some(first_value) = values.first() {
if let Err(e) = get_app_handle().emit(WS_EVENT::FRIEND_USER_STATUS, first_value) {
error!("Failed to emit friend-user-status event: {:?}", e);
}
} else {
info!("Received friend-user-status event with empty payload");
}
}
_ => error!("Received unexpected payload format for friend-user-status"),
}
}