matcha icon indicating copy to clipboard operation
matcha copied to clipboard

FEAT: Plugin API - account info API

Open andrinoff opened this issue 7 months ago • 2 comments

Is your feature request related to a problem?

Plugins have no way to query account information. There is no matcha.accounts() or matcha.current_account() API. Multi-account setups can't have account-specific plugin behavior (e.g. different signatures per account, different auto-BCC rules, account-specific workflows).

Describe the solution you'd like

Add API functions:

-- Get the currently active account
local acct = matcha.current_account()
-- acct.email, acct.name, acct.id

-- List all configured accounts
local accounts = matcha.accounts()
for _, acct in ipairs(accounts) do
    matcha.log(acct.email)
end

Only expose safe, read-only fields (email, display name, account ID). Do not expose passwords, tokens, or server credentials.

Describe alternatives you've considered

Using the account_id field already present in hook email tables and hardcoding known IDs. This is fragile and doesn't let plugins discover accounts dynamically.

Additional context

N/A

andrinoff avatar Apr 15 '26 19:04 andrinoff

This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.

floatpanebot avatar May 16 '26 05:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar May 30 '26 05:05 floatpanebot