Commit Graph
57 Commits
Author SHA1 Message Date
stefanfeng 190ec48d9c feat: add takeover service core logic
Implement TakeoverService for avatar takeover chat feature:
- check_takeover_enabled: query Authorization for enabled takeover
- generate_reply: call local chat API via httpx to generate responses
- execute_takeover: get owner IM credentials, generate reply, send via BoxIM
- enqueue_delayed_message: Redis delayed queue with graceful degradation
- process_delayed_queue: placeholder for scheduled worker

Service degrades gracefully when Redis is unavailable.
2026-08-07 16:46:57 +08:00
stefanfeng 0cc43a0d8c fix: exclude signature from signing string in BoxIMClient
Prevents stale signature values from leaking into the MD5 signing
calculation, matching the news_service.py pattern. Adds a test that
passes a stale signature in extra params and verifies the returned
signature is freshly computed.
2026-08-07 16:42:00 +08:00
stefanfeng 43bb57eacf feat: add Box IM client for Netease Yunxin integration
Add BoxIMClient with get_credentials and send_p2p_message methods,
using Huihui platform MD5 signing mechanism (sorted keys, 24h timestamp,
12-char alphanumeric nonce). Includes full test coverage.
2026-08-07 16:36:50 +08:00
stefanfeng 7327939b4d feat: add takeover fields to Authorization model
Add takeover_enabled, takeover_mode, and takeover_delay_seconds columns
to the Authorization model with a SQLite migration, and include them
in to_dict(). Test: test_takeover_model.py.
2026-08-07 16:30:29 +08:00
stefanfeng e3cce871b0 fix: add avatar photo upload endpoint to digital-avatar-app backend
- Add POST /api/avatar/{id}/photo endpoint
- Save uploaded photos to UPLOAD_DIR/{avatar_id}/
- Update avatar.photo_url in database
- Import UPLOAD_DIR from knowledge router
2026-08-07 15:10:59 +08:00
stefanfeng e3bda469bb feat: complete huihui square avatar workflows 2026-07-24 14:04:21 +08:00
stefanfeng 2d9f26a6f0 feat: add avatar chat and knowledge workflow 2026-07-23 17:21:49 +08:00