|
|
@ -3,6 +3,7 @@ package keybase |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"bufio" |
|
|
|
"bufio" |
|
|
|
"encoding/json" |
|
|
|
"encoding/json" |
|
|
|
|
|
|
|
"errors" |
|
|
|
"os/exec" |
|
|
|
"os/exec" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
"time" |
|
|
@ -114,6 +115,9 @@ func chatAPIOut(keybasePath string, c ChatAPI) (ChatAPI, error) { |
|
|
|
if err := json.Unmarshal(cmdOut, &r); err != nil { |
|
|
|
if err := json.Unmarshal(cmdOut, &r); err != nil { |
|
|
|
return ChatAPI{}, err |
|
|
|
return ChatAPI{}, err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if r.Error != nil { |
|
|
|
|
|
|
|
return ChatAPI{}, errors.New(r.Error.Message) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return r, nil |
|
|
|
return r, nil |
|
|
|
} |
|
|
|
} |
|
|
|