Implement WhatsApp linking

This commit is contained in:
2026-02-15 23:21:18 +00:00
parent 88224d972c
commit 10af1e4d6b
3 changed files with 63 additions and 36 deletions

View File

@@ -105,23 +105,17 @@ class WhatsAppAccountAdd(SuperUserRequiredMixin, ObjectRead):
qr_value = str(state.get("pair_qr") or "")
return [
f"connected={bool(state.get('connected'))}",
f"runtime_updated={_age('updated_at')}",
f"runtime_seen={_age('runtime_seen_at')}",
f"pair_requested={_age('pair_requested_at')}",
f"qr_received={_age('qr_received_at')}",
f"last_qr_probe={_age('last_qr_probe_at')}",
f"pair_status={state.get('pair_status') or '-'}",
f"pair_request_source={state.get('pair_request_source') or '-'}",
f"qr_probe_result={state.get('qr_probe_result') or '-'}",
f"qr_handler_supported={state.get('qr_handler_supported')}",
f"qr_handler_registered={state.get('qr_handler_registered')}",
f"event_hook_callable={state.get('event_hook_callable')}",
f"event_support={state.get('event_support') or {}}",
f"last_event={state.get('last_event') or '-'}",
f"last_error={state.get('last_error') or '-'}",
f"pair_qr_present={bool(qr_value)} len={len(qr_value)}",
f"accounts={state.get('accounts') or []}",
f"warning={state.get('warning') or '-'}",
f"pair_qr_present={bool(qr_value)}",
f"session_db={state.get('session_db') or '-'}",
]
def post(self, request, *args, **kwargs):