bulltrackers-module 1.0.498 → 1.0.499

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.
@@ -266,11 +266,11 @@ exports.runRootDataIndexer = async (config, dependencies) => {
266
266
  // Single tracking documents at root level:
267
267
  // - PopularInvestorSocialPostData/_dates -> fetchedDates.{date}
268
268
  // - SignedInUserSocialPostData/_dates -> fetchedDates.{date}
269
- // For generic social (InstrumentFeedSocialPostData), check the collection directly
269
+ // For generic social (InstrumentFeedSocialPostData), check the posts subcollection
270
270
  const [piSocialTrackingDoc, signedInSocialTrackingDoc, genericSocialSnap] = await Promise.all([
271
271
  db.collection('PopularInvestorSocialPostData').doc('_dates').get(),
272
272
  db.collection('SignedInUserSocialPostData').doc('_dates').get(),
273
- db.collection('InstrumentFeedSocialPostData').doc(dateStr).limit(1).get()
273
+ db.collection('InstrumentFeedSocialPostData').doc(dateStr).collection('posts').limit(1).get()
274
274
  ]);
275
275
 
276
276
  // Check if date exists in tracking documents
@@ -326,7 +326,7 @@ exports.runRootDataIndexer = async (config, dependencies) => {
326
326
  const [
327
327
  normPortExists, specPortExists,
328
328
  normHistExists, specHistExists,
329
- insightsSnap, socialQuerySnap,
329
+ insightsSnap, genericSocialExists,
330
330
  piRankingsSnap,
331
331
  piPortExists,
332
332
  piDeepExists,
@@ -339,7 +339,7 @@ exports.runRootDataIndexer = async (config, dependencies) => {
339
339
  checkAnyPartExists(normHistPartsRef),
340
340
  checkAnyPartExists(specHistPartsRef),
341
341
  insightsRef.get(),
342
- genericSocialSnap.empty ? Promise.resolve(false) : Promise.resolve(true),
342
+ Promise.resolve(!genericSocialSnap.empty),
343
343
  piRankingsRef.get(),
344
344
  // Check new structure first, fallback to legacy
345
345
  checkDateCollectionHasDocs(piPortfoliosCollectionRef).then(exists => exists || checkAnyPartExists(piPortfoliosPartsRef)),
@@ -392,7 +392,7 @@ exports.runRootDataIndexer = async (config, dependencies) => {
392
392
  availability.hasPortfolio = normPortExists || specPortExists || piPortExists || signedInPortExists;
393
393
  availability.hasHistory = normHistExists || specHistExists || piHistExists || signedInHistExists;
394
394
  availability.hasInsights = insightsSnap.exists;
395
- availability.hasSocial = !socialQuerySnap.empty;
395
+ availability.hasSocial = foundPISocial || foundSignedInSocial || genericSocialExists;
396
396
 
397
397
  // Price Check
398
398
  if (targetDate) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.498",
3
+ "version": "1.0.499",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [