bulltrackers-module 1.0.503 → 1.0.505
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.
|
@@ -250,10 +250,10 @@ async function handleRequest(message, context, configObj, dependencies) {
|
|
|
250
250
|
await handlePopularInvestorUpdate(taskData, configObj, dependencies);
|
|
251
251
|
break;
|
|
252
252
|
case 'ON_DEMAND_USER_UPDATE':
|
|
253
|
-
// For ON_DEMAND_USER_UPDATE, the
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
const onDemandTaskData =
|
|
253
|
+
// For ON_DEMAND_USER_UPDATE, the payload contains both top-level fields (cid, username, etc.)
|
|
254
|
+
// and a nested 'data' object (includeSocial, since, etc.)
|
|
255
|
+
// Merge both to create the complete task data
|
|
256
|
+
const onDemandTaskData = {
|
|
257
257
|
cid: payload.cid,
|
|
258
258
|
username: payload.username,
|
|
259
259
|
requestId: payload.requestId,
|
|
@@ -262,11 +262,12 @@ async function handleRequest(message, context, configObj, dependencies) {
|
|
|
262
262
|
effectiveRequestedBy: payload.effectiveRequestedBy,
|
|
263
263
|
metadata: payload.metadata,
|
|
264
264
|
priority: payload.priority,
|
|
265
|
-
|
|
265
|
+
// Merge nested data object if it exists
|
|
266
|
+
...(data || payload.data || {})
|
|
266
267
|
};
|
|
267
268
|
|
|
268
269
|
if (!onDemandTaskData.cid || !onDemandTaskData.username) {
|
|
269
|
-
logger.log('ERROR', `[TaskEngine] ON_DEMAND_USER_UPDATE missing required fields (cid or username)`, { payload, onDemandTaskData });
|
|
270
|
+
logger.log('ERROR', `[TaskEngine] ON_DEMAND_USER_UPDATE missing required fields (cid or username)`, { payload, data, onDemandTaskData });
|
|
270
271
|
return;
|
|
271
272
|
}
|
|
272
273
|
|