Codebase list golang-github-nlopes-slack / 11c0687
Use int64 as golang Unix Timestamp for SetUserCustomStatus Jean-Loup Adde authored 5 years ago James committed 5 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
481481 // will automatically set it to ":speech_balloon:". Otherwise, if both are ""
482482 // the Slack API will unset the custom status/emoji. If statusExpiration is set to 0
483483 // the status will not expire.
484 func (api *Client) SetUserCustomStatus(statusText, statusEmoji string, statusExpiration int) error {
484 func (api *Client) SetUserCustomStatus(statusText, statusEmoji string, statusExpiration int64) error {
485485 return api.SetUserCustomStatusContext(context.Background(), statusText, statusEmoji, statusExpiration)
486486 }
487487
488488 // SetUserCustomStatusContext will set a custom status and emoji for the currently authenticated user with a custom context
489489 //
490490 // For more information see SetUserCustomStatus
491 func (api *Client) SetUserCustomStatusContext(ctx context.Context, statusText, statusEmoji string, statusExpiration int) error {
491 func (api *Client) SetUserCustomStatusContext(ctx context.Context, statusText, statusEmoji string, statusExpiration int64) error {
492492 // XXX(theckman): this anonymous struct is for making requests to the Slack
493493 // API for setting and unsetting a User's Custom Status/Emoji. To change
494494 // these values we must provide a JSON document as the profile POST field.
503503 &struct {
504504 StatusText string `json:"status_text"`
505505 StatusEmoji string `json:"status_emoji"`
506 StatusExpiration int `json:"status_expiration"`
506 StatusExpiration int64 `json:"status_expiration"`
507507 }{
508508 StatusText: statusText,
509509 StatusEmoji: statusEmoji,