mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: regression re: attachment handling
This commit is contained in:
@@ -46,7 +46,7 @@ Notes.assert = async (uid, input, options = {}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse ActivityPub-specific data if exists (if not, was parsed already)
|
// Parse ActivityPub-specific data if exists (if not, was parsed already)
|
||||||
if (postData.hasOwnProperty('_activityPub')) {
|
if (postData.hasOwnProperty('_activitypub')) {
|
||||||
const { to, cc, attachment } = postData._activitypub;
|
const { to, cc, attachment } = postData._activitypub;
|
||||||
await Notes.updateLocalRecipients(id, { to, cc });
|
await Notes.updateLocalRecipients(id, { to, cc });
|
||||||
await Notes.saveAttachments(id, attachment);
|
await Notes.saveAttachments(id, attachment);
|
||||||
@@ -115,7 +115,6 @@ Notes.saveAttachments = async (id, attachments) => {
|
|||||||
|
|
||||||
const hash = crypto.createHash('sha256').update(url).digest('hex');
|
const hash = crypto.createHash('sha256').update(url).digest('hex');
|
||||||
const key = `attachment:${hash}`;
|
const key = `attachment:${hash}`;
|
||||||
console.log('attachment key is', key);
|
|
||||||
|
|
||||||
bulkOps.hash.push([key, { mediaType, url, name, width, height }]);
|
bulkOps.hash.push([key, { mediaType, url, name, width, height }]);
|
||||||
bulkOps.zset.score.push(idx);
|
bulkOps.zset.score.push(idx);
|
||||||
|
|||||||
Reference in New Issue
Block a user