fix:APP-push点击文案显示home页

This commit is contained in:
吕新雨
2026-03-12 18:02:25 +08:00
parent d37262876b
commit 22443c82b6
12 changed files with 414 additions and 16 deletions

View File

@@ -16,6 +16,7 @@ from app.db.models.push_preference import PushPreference
from app.db.models.push_token import PushToken
from app.db.models.push_send_log import PushSendLog
from app.db.session import get_db
from app.features.push_payload import build_home_push_data
from app.features.user_profile_scoring.types import UserProfileV1_2
from app.worker import celery_app
@@ -289,7 +290,16 @@ async def test_push(
title = req.title or "Dear Mama"
body = req.body or "这是一条测试推送dev"
expo_res = await _send_expo_push(to=token.push_token, title=title, body=body, data={"client_user_id": req.client_user_id})
expo_res = await _send_expo_push(
to=token.push_token,
title=title,
body=body,
data=build_home_push_data(
client_user_id=req.client_user_id,
body=body,
scene="push",
),
)
_ = accept_language
return {"status": "ok", "expo": expo_res}