fix(mastodon-api): pass collections object (not raw collection) to addTimelineItem
addTimelineItem(collections, item) destructures { ap_timeline } from its
first argument. Passing collections.ap_timeline directly gave it a raw
MongoDB collection with no ap_timeline property, causing
"Cannot read properties of undefined (reading 'updateOne')".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -339,7 +339,7 @@ router.post("/api/v1/statuses", async (req, res, next) => {
|
||||
};
|
||||
|
||||
try {
|
||||
await addTimelineItem(collections.ap_timeline, timelineItem);
|
||||
await addTimelineItem(collections, timelineItem);
|
||||
} catch (storeError) {
|
||||
console.warn("[Mastodon API] Failed to store outbound DM in timeline:", storeError.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user