diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/gateway/shard.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/gateway/shard.rs b/src/client/gateway/shard.rs index 8a6222a..03774ac 100644 --- a/src/client/gateway/shard.rs +++ b/src/client/gateway/shard.rs @@ -239,12 +239,11 @@ impl Shard { /// ``` pub fn set_presence(&mut self, game: Option<Game>, - status: OnlineStatus, + mut status: OnlineStatus, afk: bool) { - let status = match status { - OnlineStatus::Offline => OnlineStatus::Invisible, - other => other, - }; + if status == OnlineStatus::Offline { + status = OnlineStatus::Invisible; + } self.current_presence = (game, status, afk); |