@evanp/activitypub-bot 0.31.0 → 0.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,6 +57,10 @@ router.post('/user/:username/inbox', async (req, res, next) => {
57
57
  return next(createHttpError(403, 'Forbidden'))
58
58
  }
59
59
 
60
+ if (!activity.id) {
61
+ return next(createHttpError(400, 'No activity id found in activity'))
62
+ }
63
+
60
64
  if (await actorStorage.isInCollection(bot.username, 'inbox', activity)) {
61
65
  return next(createHttpError(400, 'Activity already delivered'))
62
66
  }
@@ -61,6 +61,10 @@ router.post('/shared/inbox', async (req, res, next) => {
61
61
  return next(createHttpError(403, `${subject} is not the actor ${actor.id}`))
62
62
  }
63
63
 
64
+ if (!activity.id) {
65
+ return next(createHttpError(400, 'No activity id found in activity'))
66
+ }
67
+
64
68
  logger.info(`Activity ${activity.id} received at shared inbox`)
65
69
 
66
70
  await deliverer.deliverToAll(activity, bots)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evanp/activitypub-bot",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "description": "server-side ActivityPub bot framework",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",