fix: 1b12 creates being dropped

This commit is contained in:
Julian Lam
2025-05-05 16:50:44 -04:00
parent 7cf61ab080
commit 9f80d10d09

View File

@@ -252,7 +252,7 @@ inbox.like = async (req) => {
};
inbox.announce = async (req) => {
const { actor, object, published, to, cc } = req.body;
let { actor, object, published, to, cc } = req.body;
activitypub.helpers.log(`[activitypub/inbox/announce] Parsing Announce(${object.type}) from ${actor}`);
let timestamp = new Date(published);
timestamp = timestamp.toString() !== 'Invalid Date' ? timestamp.getTime() : Date.now();
@@ -292,6 +292,12 @@ inbox.announce = async (req) => {
break;
}
case object.type === 'Create': {
object = object.object;
// falls through
}
// Announce(Object)
case activitypub._constants.acceptedPostTypes.includes(object.type): {
if (String(object.id).startsWith(nconf.get('url'))) { // Local object
const { type, id } = await activitypub.helpers.resolveLocalId(object.id);