fix memo selection
release / docker-image (push) Successful in 1m9s
release / goreleaser (push) Successful in 10m14s

This commit is contained in:
2026-02-12 18:33:05 +03:00
parent a844ccfc88
commit 868c90c896
2 changed files with 37 additions and 16 deletions
-12
View File
@@ -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
}