의 미러
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-07-08 02:34:16 +00:00
Add support for expiring mutes
This commit is contained in:
부모
9816045c21
커밋
5147897c6c
7개의 변경된 파일과 64개의 추가작업 그리고 25개의 파일을 삭제
|
@ -246,11 +246,10 @@ func (c *Client) AccountUnblock(ctx context.Context, id string) (*Relationship,
|
|||
}
|
||||
|
||||
// AccountMute mute the account.
|
||||
func (c *Client) AccountMute(ctx context.Context, id string, notifications *bool) (*Relationship, error) {
|
||||
func (c *Client) AccountMute(ctx context.Context, id string, notifications bool, duration int) (*Relationship, error) {
|
||||
params := url.Values{}
|
||||
if notifications != nil {
|
||||
params.Set("notifications", strconv.FormatBool(*notifications))
|
||||
}
|
||||
params.Set("notifications", strconv.FormatBool(notifications))
|
||||
params.Set("duration", strconv.Itoa(duration))
|
||||
var relationship Relationship
|
||||
err := c.doAPI(ctx, http.MethodPost, fmt.Sprintf("/api/v1/accounts/%s/mute", url.PathEscape(string(id))), params, &relationship, nil)
|
||||
if err != nil {
|
||||
|
|
불러오는 중…
테이블 추가
Add a link
Reference in a new issue