Use int64 as golang Unix Timestamp for SetUserCustomStatus
Jean-Loup Adde authored 5 years ago
James committed 5 years ago
481 | 481 | // will automatically set it to ":speech_balloon:". Otherwise, if both are "" |
482 | 482 | // the Slack API will unset the custom status/emoji. If statusExpiration is set to 0 |
483 | 483 | // 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 { | |
485 | 485 | return api.SetUserCustomStatusContext(context.Background(), statusText, statusEmoji, statusExpiration) |
486 | 486 | } |
487 | 487 | |
488 | 488 | // SetUserCustomStatusContext will set a custom status and emoji for the currently authenticated user with a custom context |
489 | 489 | // |
490 | 490 | // 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 { | |
492 | 492 | // XXX(theckman): this anonymous struct is for making requests to the Slack |
493 | 493 | // API for setting and unsetting a User's Custom Status/Emoji. To change |
494 | 494 | // these values we must provide a JSON document as the profile POST field. |
503 | 503 | &struct { |
504 | 504 | StatusText string `json:"status_text"` |
505 | 505 | StatusEmoji string `json:"status_emoji"` |
506 | StatusExpiration int `json:"status_expiration"` | |
506 | StatusExpiration int64 `json:"status_expiration"` | |
507 | 507 | }{ |
508 | 508 | StatusText: statusText, |
509 | 509 | StatusEmoji: statusEmoji, |