Skip to content

fix: 每日任务页面快照缺失时回退到 App dapi 通道上报 - #58

Open
298594413 wants to merge 1 commit into
chiihero:V4-chinafrom
298594413:fix/dailyset-dapi
Open

298594413 wants to merge 1 commit into
chiihero:V4-chinafrom
298594413:fix/dailyset-dapi

Conversation

@298594413

Copy link
Copy Markdown

问题

V4-china / geo=CN 环境下,每日任务(dailySet)在页面快照(RSC flight 数据)中无 offerId(offers 恒=7),ensureOffer 找不到 → 直接跳过,每日任务永远无法自动完成。

修复

页面快照缺失时,回退到 App dapi 官方通道 上报:
POST prod.rewardsplatform.microsoft.com/dapi/me/activities(URLs.platform.activities,端点早已定义但从未被调用)。

  • Bearer token:登录时已获取的 this.bot.accessToken(MBI_SSL scope)
  • body 对照 BingSapphire App 抓包:{attributes:{offerid}, amount:1, type:101, risk_context:{}, channel:'SAAndroid', id:UUID, meta:'', country:'cn'}
  • meta 实测服务端不校验(空串可接受)
  • 成功判定 code===0,日志输出 dapi 上报完成 | pointsGained=10

验证

geo=CN 移动端实跑:dapi 上报完成 | offerId=Gamification_DailySet_ZHCN_20261019_Child3 | pointsGained=10(其余 Child 手动确认同通道有效)。

仅改动 src/functions/activities/api/UrlReward.ts 一个文件。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant