this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add check for "missing" statuses in context

+18
+18
src/pages/status.jsx
··· 248 248 249 249 totalDescendants.current = descendants?.length || 0; 250 250 251 + const missingStatuses = new Set(); 251 252 ancestors.forEach((status) => { 252 253 saveStatus(status, instance, { 253 254 skipThreading: true, 254 255 }); 256 + if ( 257 + status.inReplyToId && 258 + !ancestors.find((s) => s.id === status.inReplyToId) 259 + ) { 260 + missingStatuses.add(status.inReplyToId); 261 + } 255 262 }); 256 263 const ancestorsIsThread = ancestors.every( 257 264 (s) => s.account.id === heroStatus.account.id, ··· 261 268 saveStatus(status, instance, { 262 269 skipThreading: true, 263 270 }); 271 + 272 + if ( 273 + status.inReplyToId && 274 + !descendants.find((s) => s.id === status.inReplyToId) 275 + ) { 276 + missingStatuses.add(status.inReplyToId); 277 + } 278 + 264 279 if (status.inReplyToAccountId === status.account.id) { 265 280 // If replying to self, it's part of the thread, level 1 266 281 nestedDescendants.push(status); ··· 290 305 }); 291 306 292 307 console.log({ ancestors, descendants, nestedDescendants }); 308 + if (missingStatuses.size) { 309 + console.error('Missing statuses', [...missingStatuses]); 310 + } 293 311 294 312 function expandReplies(_replies) { 295 313 return _replies?.map((_r) => ({