From fb97dbee2e042d528515b7bb41d6acae49ee3aa9 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Wed, 1 May 2019 13:21:52 +0100 Subject: [PATCH] Added Friend.RequestInfoAsync --- Facepunch.Steamworks/Structs/Friend.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Facepunch.Steamworks/Structs/Friend.cs b/Facepunch.Steamworks/Structs/Friend.cs index eeaf5ef..b73ec6b 100644 --- a/Facepunch.Steamworks/Structs/Friend.cs +++ b/Facepunch.Steamworks/Structs/Friend.cs @@ -47,6 +47,15 @@ public override string ToString() /// public bool IsOnline => State != FriendState.Offline; + /// + /// Sometimes we don't know the user's name. This will wait until we have + /// downloaded the information on this user. + /// + public async Task RequestInfoAsync( int timeout = 5000 ) + { + await SteamFriends.CacheUserInformationAsync( Id, true, timeout ); + } + /// /// Returns true if this friend is marked as away ///