mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 05:50:44 +08:00
feat(whatsapp): add access control with quote-based admin approval
Introduce whitelist/blacklist gating, pending requests, Admin UI management, and stanza-mapped quote approval so admins can approve via WhatsApp DM without blocking normal LLM chat. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
8781a200c9
commit
1ea13a205d
13 changed files with 3048 additions and 30 deletions
|
|
@ -307,8 +307,14 @@ def create_app() -> FastAPI:
|
|||
return {"ok": False, "error": "missing id"}
|
||||
ok = bool(body.get("ok", True))
|
||||
err = str(body.get("error") or "").strip()
|
||||
stanza_id = str(body.get("stanza_id") or "").strip()
|
||||
store = get_assistant_store()
|
||||
changed = store.ack_channel_outbound_message(message_id=msg_id, ok=ok, error=err)
|
||||
changed = store.ack_channel_outbound_message(
|
||||
message_id=msg_id,
|
||||
ok=ok,
|
||||
error=err,
|
||||
stanza_id=stanza_id,
|
||||
)
|
||||
return {"ok": changed}
|
||||
|
||||
@app.get("/weixin/outbound/pending")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue