fix: lemmy integration, handle image property as topic thumb

This commit is contained in:
Julian Lam
2024-12-12 11:37:22 -05:00
parent 3439fdb600
commit b15a684a92
2 changed files with 26 additions and 3 deletions

View File

@@ -187,6 +187,14 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
]);
unprocessed.shift();
// These must come after topic is posted
await Promise.all([
mainPost._activitypub.image ? topics.thumbs.associate({
id: tid,
path: mainPost._activitypub.image,
}) : null,
]);
if (context) {
activitypub.helpers.log(`[activitypub/notes.assert] Associating tid ${tid} with context ${context}`);
await topics.setTopicField(tid, 'context', context);