@jetthai/cuora 1.1.297-dev-1 → 1.1.297-dev-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/lib/fingerprint.js +1594 -1564
- package/src/machine/activity/instant_rebate_activity.js +6 -0
- package/src/machine/inbox.js +2 -2
|
@@ -74,12 +74,14 @@ export default function (request) {
|
|
|
74
74
|
},
|
|
75
75
|
checking: {
|
|
76
76
|
always: [
|
|
77
|
+
{ target: 'claimAmountLimitReached', cond: 'isClaimAmountLimitReached' },
|
|
77
78
|
{ target: 'claimExhausted', cond: 'isClaimExhausted' },
|
|
78
79
|
{ target: 'insufficientAmount', cond: 'isInsufficientAmount' },
|
|
79
80
|
{ target: 'claimEnable', cond: 'isClaimEnable' },
|
|
80
81
|
{ target: 'cantEstimate' },
|
|
81
82
|
],
|
|
82
83
|
},
|
|
84
|
+
claimAmountLimitReached: {},
|
|
83
85
|
claimExhausted: {},
|
|
84
86
|
insufficientAmount: {},
|
|
85
87
|
claimEnable: {
|
|
@@ -161,6 +163,10 @@ export default function (request) {
|
|
|
161
163
|
return parseInt(`${currentTime}`) - parseInt(`${lastEstimateTime}`) > fiveMinutes
|
|
162
164
|
}
|
|
163
165
|
},
|
|
166
|
+
isClaimAmountLimitReached: (context, event) => {
|
|
167
|
+
const { collectAvailable } = context
|
|
168
|
+
return !collectAvailable
|
|
169
|
+
},
|
|
164
170
|
isClaimExhausted: (context, event) => {
|
|
165
171
|
const { collectAvailable, remainingCount, dailyRedemptionLimit } = context
|
|
166
172
|
return !collectAvailable && parseInt(`${remainingCount}`) === parseInt(`${dailyRedemptionLimit}`)
|
package/src/machine/inbox.js
CHANGED
|
@@ -344,9 +344,9 @@ export default function (request) {
|
|
|
344
344
|
const isCustomerReply = data[0]?.from === 'SYSTEM'
|
|
345
345
|
let combindedContent = ''
|
|
346
346
|
if (isCustomerReply) {
|
|
347
|
-
combindedContent = '-\n-------------------------\n' + data[0]
|
|
347
|
+
combindedContent = '-\n-------------------------\n' + data[0]?.content || '' + '\n-------------------------\n' + data[1]?.content || ''
|
|
348
348
|
} else {
|
|
349
|
-
combindedContent = `-\n-------------------------\n${data[0]
|
|
349
|
+
combindedContent = `-\n-------------------------\n${data[0]?.content || ''}`
|
|
350
350
|
}
|
|
351
351
|
return {
|
|
352
352
|
messageDetail: data,
|