diff --git a/Facepunch.Steamworks.Test/Client/RichPresenceTest.cs b/Facepunch.Steamworks.Test/Client/RichPresenceTest.cs
index b261979..ad64ae2 100644
--- a/Facepunch.Steamworks.Test/Client/RichPresenceTest.cs
+++ b/Facepunch.Steamworks.Test/Client/RichPresenceTest.cs
@@ -26,7 +26,8 @@ public void ReadBackSetKey()
{
using ( var client = new Steamworks.Client( 252490 ) )
{
- client.User.SetRichPresence( "One", "Two" );
+ var success = client.User.SetRichPresence( "One", "Two" );
+ Assert.IsTrue( success );
var value = client.User.GetRichPresence( "One" );
Assert.IsNotNull( value );
@@ -39,7 +40,8 @@ public void ClearingKeys()
{
using ( var client = new Steamworks.Client( 252490 ) )
{
- client.User.SetRichPresence( "One", "Two" );
+ var success = client.User.SetRichPresence( "One", "Two" );
+ Assert.IsTrue( success );
var value = client.User.GetRichPresence( "One" );
Assert.IsNotNull( value );
diff --git a/Facepunch.Steamworks/Client/User.cs b/Facepunch.Steamworks/Client/User.cs
index daf3363..75f8ffe 100644
--- a/Facepunch.Steamworks/Client/User.cs
+++ b/Facepunch.Steamworks/Client/User.cs
@@ -25,22 +25,29 @@ public void Dispose()
client = null;
}
+ ///
+ /// Find a rich presence data by key for current user. Will be null if not found.
+ ///
public string GetRichPresence( string key )
{
- string val = null;
-
- if ( richPresence.TryGetValue( key, out val ) )
+ if ( richPresence.TryGetValue( key, out var val ) )
return val;
return null;
}
- public void SetRichPresence( string key, string value )
+ ///
+ /// Sets rich presence value by key for current user.
+ ///
+ public bool SetRichPresence( string key, string value )
{
richPresence[key] = value;
- client.native.friends.SetRichPresence( key, value );
+ return client.native.friends.SetRichPresence( key, value );
}
+ ///
+ /// Clears all of the current user's rich presence data.
+ ///
public void ClearRichPresence()
{
richPresence.Clear();