aiden-shared-calculations-unified 1.0.9 → 1.0.10
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.
|
@@ -8,6 +8,7 @@ class SocialActivityAggregation {
|
|
|
8
8
|
this.tickerActivity = {};
|
|
9
9
|
this.totalLikes = 0;
|
|
10
10
|
this.totalComments = 0;
|
|
11
|
+
this.totalPosts = 0; // <-- ADD THIS LINE
|
|
11
12
|
this.processed = false; // Flag to ensure this runs only once
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -27,6 +28,7 @@ class SocialActivityAggregation {
|
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
30
|
this.processed = true;
|
|
31
|
+
this.totalPosts = Object.keys(todaySocialPostInsights).length;
|
|
30
32
|
|
|
31
33
|
const posts = Object.values(todaySocialPostInsights);
|
|
32
34
|
|
|
@@ -82,7 +84,8 @@ class SocialActivityAggregation {
|
|
|
82
84
|
globalActivity: {
|
|
83
85
|
totalLikes: this.totalLikes,
|
|
84
86
|
totalComments: this.totalComments,
|
|
85
|
-
totalPosts:
|
|
87
|
+
totalPosts: this.totalPosts
|
|
88
|
+
// --- END FIX ---
|
|
86
89
|
},
|
|
87
90
|
tickerActivity: tickerAverageActivity
|
|
88
91
|
};
|
|
@@ -92,6 +95,7 @@ class SocialActivityAggregation {
|
|
|
92
95
|
this.tickerActivity = {};
|
|
93
96
|
this.totalLikes = 0;
|
|
94
97
|
this.totalComments = 0;
|
|
98
|
+
this.totalPosts = 0;
|
|
95
99
|
this.processed = false;
|
|
96
100
|
}
|
|
97
101
|
}
|