Skip to content

Commit dc486f0

Browse files
author
Xevalous
committed
refactor: align UrlReward with PR TheNetsky#496 - use flyoutResult.morePromotions
- Add flyoutResult.morePromotions lookup - Use userInfo.promotions with fallback to name field - Align with upstream V4 changes
1 parent 2f92060 commit dc486f0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/functions/activities/api/UrlReward.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ export class UrlReward extends Workers {
5252
const todayKey = this.bot.utils.getFormattedDate()
5353
const userInfo = (panelData as any)?.userInfo
5454

55+
// Find in: flyoutResult.morePromotions, userInfo.promotions, dailySetPromotions
5556
const panelPromotion =
56-
userInfo?.morePromotions?.find((p: any) => p.offerId === offerId) ||
57+
panelData?.flyoutResult?.morePromotions?.find((p: any) => p.offerId === offerId) ||
58+
userInfo?.promotions?.find((p: any) => p.offerId === offerId || p.name === offerId) ||
5759
panelData?.flyoutResult?.dailySetPromotions?.[todayKey]?.find((p: any) => p.offerId === offerId)
5860

5961
if (!panelPromotion) {

0 commit comments

Comments
 (0)