fix: false-positive detection of CustomStatusGame based on Id property (#1416)

This change fixes a bug that was introduced in PR #1406. Games were falsely detected to be CustomStatusGames, based on the Id property being included in the model payload.

This fixes the false detection of Games as CustomStatusGame. An activity will only be considered a CustomStatusGame if the Id has a value of "custom".

This change has been tested by listening to the GuildMemberUpdated event, and opening/closing games with a custom status set.
This commit is contained in:
Chris Johnston
2019-11-29 19:13:08 -08:00
committed by Christopher F
parent 2bba324143
commit a4846516fb

View File

@@ -10,7 +10,7 @@ namespace Discord.WebSocket
public static IActivity ToEntity(this API.Game model)
{
// Custom Status Game
if (model.Id.IsSpecified)
if (model.Id.IsSpecified && model.Id.Value == "custom")
{
return new CustomStatusGame()
{