From b5bfa454d0cdd57389ad793f7745aaa4d15223dd Mon Sep 17 00:00:00 2001 From: Chris Rhodes Date: Tue, 29 Dec 2015 10:35:00 -0800 Subject: [PATCH] Do not send game if one is not provided (instead of not sending game.name) --- wsapi.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wsapi.go b/wsapi.go index 127080d..5eee758 100644 --- a/wsapi.go +++ b/wsapi.go @@ -60,12 +60,12 @@ func (s *Session) Handshake() (err error) { } type updateStatusGame struct { - Name *string `json:"name"` + Name string `json:"name"` } type updateStatusData struct { - IdleSince *int `json:"idle_since"` - Game updateStatusGame `json:"game"` + IdleSince *int `json:"idle_since"` + Game *updateStatusGame `json:"game"` } type updateStatusOp struct { @@ -83,7 +83,7 @@ func (s *Session) UpdateStatus(idle int, game string) (err error) { usd.IdleSince = &idle } if game != "" { - usd.Game.Name = &game + usd.Game = &updateStatusGame{game} } data := updateStatusOp{3, usd}