From a2804a5385ab496689a700a36392e76af2660365 Mon Sep 17 00:00:00 2001 From: Maple Nebel Date: Wed, 8 Jul 2026 04:22:05 +0200 Subject: [PATCH] fix issues with incorrect user displaying --- rnex-core/src/nex/friends_handler.rs | 14 ++++++++++++++ rnex-core/src/rmc/protocols/friends_wiiu.rs | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/rnex-core/src/nex/friends_handler.rs b/rnex-core/src/nex/friends_handler.rs index c947ab8..ed87bfd 100644 --- a/rnex-core/src/nex/friends_handler.rs +++ b/rnex-core/src/nex/friends_handler.rs @@ -837,6 +837,20 @@ impl FriendsWiiU for FriendsUser { let users = self.fm.users.read().await; if let Some(user) = users.get(&friend).and_then(|v| v.upgrade()) { + let mut fr = fr.clone(); + + let Ok(query) = query!( + "select * from nintendo_network_accounts where pid = $1", + self.pid + ) + .fetch_one(get_db()) + .await + else { + println!("failed to acquire account info after adding friend"); + return Err(ErrorCode::FPD_InvalidMessageID); + }; + fr.basic_info = basic_principal_from_record!(query); + user.remote .process_nintendo_notification_event_2(NintendoNotificationEvent { event_type: 27, diff --git a/rnex-core/src/rmc/protocols/friends_wiiu.rs b/rnex-core/src/rmc/protocols/friends_wiiu.rs index 1fc73cd..d77baeb 100644 --- a/rnex-core/src/rmc/protocols/friends_wiiu.rs +++ b/rnex-core/src/rmc/protocols/friends_wiiu.rs @@ -102,7 +102,7 @@ pub struct FriendInfo { pub unk: u64, } -#[derive(RmcSerialize, Debug)] +#[derive(RmcSerialize, Debug, Clone)] #[rmc_struct(0)] pub struct FriendRequestMessage { #[extends] @@ -118,7 +118,7 @@ pub struct FriendRequestMessage { pub expires_on: KerberosDateTime, } -#[derive(RmcSerialize, Debug)] +#[derive(RmcSerialize, Debug, Clone)] #[rmc_struct(0)] pub struct FriendRequest { #[extends]