FRE-682: Add folder/label management, search, and fix PGP build

- Add pop mail search CLI command with pagination support
- Create internal/labels package with types and API client
- Add folder list/create/update/delete CLI commands
- Add label list/create/update/delete/apply/remove CLI commands
- Register folder and label commands in root.go
- Fix gopenpgp v2 API mismatches in pgp.go (NewPlainMessage, Armor,
  KeyRing.Encrypt/Decrypt, SessionKey)
- Fix NewSessionManager error handling across cmd files
- Fix variable shadowing bug in mail/client.go
This commit is contained in:
Paperclip
2026-04-28 06:37:47 -04:00
committed by Michael Freno
parent 35d47733ea
commit af25fd5575
12 changed files with 1033 additions and 84 deletions

View File

@@ -238,7 +238,7 @@ func (c *Client) SaveDraft(draft Draft, passphrase string) (string, error) {
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return "", fmt.Errorf("failed to read response: %w", err)
}
@@ -248,7 +248,7 @@ func (c *Client) SaveDraft(draft Draft, passphrase string) (string, error) {
MessageID string `json:"MessageID"`
} `json:"Data"`
}
if err := json.Unmarshal(body, &result); err != nil {
if err := json.Unmarshal(respBody, &result); err != nil {
return "", fmt.Errorf("failed to parse response: %w", err)
}