diff --git a/chat.go b/chat.go index 73fa993..f51d8bc 100644 --- a/chat.go +++ b/chat.go @@ -71,8 +71,8 @@ func getNewMessages(k *Keybase, c chan<- ChatAPI, execOptions []string) { execCmd.Start() scanner := bufio.NewScanner(stdOut) go func(scanner *bufio.Scanner, c chan<- ChatAPI) { - var jsonData ChatAPI for scanner.Scan() { + var jsonData ChatAPI json.Unmarshal([]byte(scanner.Text()), &jsonData) c <- jsonData }