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:
committed by
Christopher F
parent
2bba324143
commit
a4846516fb
@@ -10,7 +10,7 @@ namespace Discord.WebSocket
|
|||||||
public static IActivity ToEntity(this API.Game model)
|
public static IActivity ToEntity(this API.Game model)
|
||||||
{
|
{
|
||||||
// Custom Status Game
|
// Custom Status Game
|
||||||
if (model.Id.IsSpecified)
|
if (model.Id.IsSpecified && model.Id.Value == "custom")
|
||||||
{
|
{
|
||||||
return new CustomStatusGame()
|
return new CustomStatusGame()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user