Move Conversations and Offline from ChatAPI to result, where they belong
This commit is contained in:
34
types.go
34
types.go
@ -13,18 +13,16 @@ type RunOptions struct {
|
|||||||
|
|
||||||
// ChatAPI holds information about a message received by the `keybase chat api-listen` command
|
// ChatAPI holds information about a message received by the `keybase chat api-listen` command
|
||||||
type ChatAPI struct {
|
type ChatAPI struct {
|
||||||
Type string `json:"type,omitempty"`
|
Type string `json:"type,omitempty"`
|
||||||
Source string `json:"source,omitempty"`
|
Source string `json:"source,omitempty"`
|
||||||
Msg msg `json:"msg,omitempty"`
|
Msg msg `json:"msg,omitempty"`
|
||||||
Method string `json:"method,omitempty"`
|
Method string `json:"method,omitempty"`
|
||||||
Params params `json:"params,omitempty"`
|
Params params `json:"params,omitempty"`
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
ID int `json:"id,omitempty"`
|
ID int `json:"id,omitempty"`
|
||||||
Ratelimits []rateLimits `json:"ratelimits,omitempty"`
|
Ratelimits []rateLimits `json:"ratelimits,omitempty"`
|
||||||
Conversations []conversation `json:"conversations,omitempty"`
|
Result result `json:"result,omitempty"`
|
||||||
Offline bool `json:"offline,omitempty"`
|
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
|
||||||
Result result `json:"result,omitempty"`
|
|
||||||
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
|
|
||||||
}
|
}
|
||||||
type sender struct {
|
type sender struct {
|
||||||
UID string `json:"uid"`
|
UID string `json:"uid"`
|
||||||
@ -160,11 +158,13 @@ type pagination struct {
|
|||||||
ForceFirstPage bool `json:"forceFirstPage,omitempty"`
|
ForceFirstPage bool `json:"forceFirstPage,omitempty"`
|
||||||
}
|
}
|
||||||
type result struct {
|
type result struct {
|
||||||
Messages []messages `json:"messages,omitempty"`
|
Messages []messages `json:"messages,omitempty"`
|
||||||
Pagination pagination `json:"pagination"`
|
Pagination pagination `json:"pagination"`
|
||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
Ratelimits []rateLimits `json:"ratelimits"`
|
Ratelimits []rateLimits `json:"ratelimits"`
|
||||||
|
Conversations []conversation `json:"conversations,omitempty"`
|
||||||
|
Offline bool `json:"offline,omitempty"`
|
||||||
}
|
}
|
||||||
type messages struct {
|
type messages struct {
|
||||||
Msg msg `json:"msg,omitempty"`
|
Msg msg `json:"msg,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user