fix memo selection
This commit is contained in:
@@ -103,15 +103,3 @@ func (c *Client) DownloadAttachment(ctx context.Context, att Attachment) ([]byte
|
||||
}
|
||||
return data, nil
|
||||
}
|
||||
|
||||
// GetRandomMemo fetches a single memo without any filter (for full fallback).
|
||||
func (c *Client) GetRandomMemo(ctx context.Context) (*Memo, error) {
|
||||
resp, err := c.ListMemos(ctx, "", 1, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(resp.Memos) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
return resp.Memos[0], nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user