diff --git a/Facepunch.Steamworks.Test/Client/FriendsTest.cs b/Facepunch.Steamworks.Test/Client/FriendsTest.cs
index fdc8292..e039980 100644
--- a/Facepunch.Steamworks.Test/Client/FriendsTest.cs
+++ b/Facepunch.Steamworks.Test/Client/FriendsTest.cs
@@ -24,6 +24,8 @@ namespace Facepunch.Steamworks.Test
foreach ( var friend in client.Friends.All )
{
Console.WriteLine( "{0}: {1} (Friend:{2}) (Blocked:{3})", friend.Id, friend.Name, friend.IsFriend, friend.IsBlocked );
+
+ Assert.IsNotNull(friend.GetAvatar( Steamworks.Friends.AvatarSize.Medium ));
}
}
}
diff --git a/Facepunch.Steamworks/Client/Friends.cs b/Facepunch.Steamworks/Client/Friends.cs
index d0eaa55..38f318c 100644
--- a/Facepunch.Steamworks/Client/Friends.cs
+++ b/Facepunch.Steamworks/Client/Friends.cs
@@ -127,6 +127,15 @@ namespace Facepunch.Steamworks
Client.native.friends.RequestFriendRichPresence( Id );
}
+
+ ///
+ /// This will return null if you don't have the target user's avatar in your cache.
+ /// Which usually happens for people not on your friends list.
+ ///
+ public Image GetAvatar( Friends.AvatarSize size )
+ {
+ return Client.Friends.GetCachedAvatar( size, Id );
+ }
}
///