Fix discord RPC errors in multiplayer

Reproduction steps:

1. Go to multiplayer
2. Create a room
3. Play a map to completion
4. Wait for "secrets cannot currently be sent with buttons" error
   messages

The fix is to clear the buttons since they're the less important ones.
This commit is contained in:
Bartłomiej Dach 2024-03-25 18:02:54 +01:00
parent a398754a27
commit 53c3aec3c3
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -191,6 +191,9 @@ private void updatePresence(bool hideIdentifiableInformation)
};
presence.Secrets.JoinSecret = JsonConvert.SerializeObject(roomSecret);
// discord cannot handle both secrets and buttons at the same time, so we need to choose something.
// the multiplayer room seems more important.
presence.Buttons = null;
}
else
{