diff --git a/index.js b/index.js index 1d8b515..d714776 100644 --- a/index.js +++ b/index.js @@ -952,8 +952,8 @@ export default class ActivityPubEndpoint { // Drop non-sparse indexes if they exist (created by earlier versions), // then recreate with sparse:true so multiple null values are allowed. - try { await this._collections.ap_muted.dropIndex("url_1"); } catch {} - try { await this._collections.ap_muted.dropIndex("keyword_1"); } catch {} + this._collections.ap_muted.dropIndex("url_1").catch(() => {}); + this._collections.ap_muted.dropIndex("keyword_1").catch(() => {}); this._collections.ap_muted.createIndex( { url: 1 }, { unique: true, sparse: true, background: true }, diff --git a/package.json b/package.json index e4199bc..1194d84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rmdes/indiekit-endpoint-activitypub", - "version": "2.0.15", + "version": "2.0.16", "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.", "keywords": [ "indiekit",