Description
In commit a0f1cd1baf, Discord Rich Presence selects the fallback image when the box-art HEAD request succeeds and selects the game URL when it fails. This reverses the intended behavior.
Source
src/qt_common/discord/discord_impl.cpp:
void DiscordImpl::UpdateGameStatus(bool use_default) {
const std::string url = use_default ? std::string{DEFAULT_DISCORD_IMAGE} : game_url;
// ...
}
// Current call:
UpdateGameStatus(res && res->status == 200);
A successful HTTP 200 passes true, therefore DEFAULT_DISCORD_IMAGE is used. A failed request passes false, therefore the missing game_url is used.
Suggested fix
UpdateGameStatus(!(res && res->status == 200));
Alternatively rename the parameter to make its meaning explicit.
Environment
- Eden Nightly
a0f1cd1baf-master
- Linux x86_64
- Official Discord IPC socket available
Description
In commit
a0f1cd1baf, Discord Rich Presence selects the fallback image when the box-art HEAD request succeeds and selects the game URL when it fails. This reverses the intended behavior.Source
src/qt_common/discord/discord_impl.cpp:A successful HTTP 200 passes
true, thereforeDEFAULT_DISCORD_IMAGEis used. A failed request passesfalse, therefore the missinggame_urlis used.Suggested fix
Alternatively rename the parameter to make its meaning explicit.
Environment
a0f1cd1baf-master