bulltrackers-module 1.0.516 → 1.0.517
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.
|
@@ -228,22 +228,23 @@ async function handleRequest(message, context, configObj, dependencies) {
|
|
|
228
228
|
await handleUpdate(data, 'single-update', dependencies, config);
|
|
229
229
|
break;
|
|
230
230
|
case 'POPULAR_INVESTOR_UPDATE':
|
|
231
|
-
// For POPULAR_INVESTOR_UPDATE,
|
|
232
|
-
//
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
231
|
+
// For POPULAR_INVESTOR_UPDATE, fields are at the payload root level
|
|
232
|
+
// Merge data object with payload root fields
|
|
233
|
+
const taskData = {
|
|
234
|
+
cid: payload.cid || data?.cid,
|
|
235
|
+
username: payload.username || data?.username,
|
|
236
|
+
requestId: payload.requestId || data?.requestId,
|
|
237
|
+
source: payload.source || data?.source,
|
|
238
|
+
requestedBy: payload.requestedBy || data?.requestedBy,
|
|
239
|
+
effectiveRequestedBy: payload.effectiveRequestedBy || data?.effectiveRequestedBy,
|
|
240
|
+
metadata: payload.metadata || data?.metadata || {},
|
|
241
|
+
priority: payload.priority || data?.priority,
|
|
242
|
+
// Merge nested data object if it exists
|
|
243
|
+
...(data || {})
|
|
243
244
|
};
|
|
244
245
|
|
|
245
|
-
if (!taskData
|
|
246
|
-
logger.log('ERROR', '[TaskEngine] POPULAR_INVESTOR_UPDATE missing required fields (cid or username)', { payload, taskData });
|
|
246
|
+
if (!taskData.cid && !taskData.username) {
|
|
247
|
+
logger.log('ERROR', '[TaskEngine] POPULAR_INVESTOR_UPDATE missing required fields (cid or username)', { payload, data, taskData });
|
|
247
248
|
return;
|
|
248
249
|
}
|
|
249
250
|
|