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_send_log import PushSendLog
from app.db.models.push_token import PushToken
from app.db.session import AsyncSessionLocal
from app.features.push_payload import build_home_push_data
from app.features.personalized_reco.content_repository.types import normalize_locale
from app.features.user_profile_scoring.scoring import build_user_profile_from_questionnaire
from app.features.user_profile_scoring.types import QuestionnaireAnswersV1_2, UserProfileV1_2
@@ -365,7 +366,12 @@ async def _send_once_async(*, client_user_id: str, local_date: date, slot_index:
to=str(token.push_token),
title=title,
body=body,
data={"client_user_id": client_user_id, "scene": "push"},
data=build_home_push_data(
client_user_id=client_user_id,
body=body,
scene="push",
content_id=picked_content_id,
),
)
# 6) 解析 Expo 回执,必要时停用 token