From 7184507be2b769269bd6846ed85e15f021c940b4 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 25 Sep 2025 15:12:52 -0400 Subject: [PATCH 1/7] fix: #13667, record to instances:lastSeen instead of domains:lastSeen --- src/activitypub/index.js | 2 +- test/activitypub/analytics.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/activitypub/index.js b/src/activitypub/index.js index 6b51236bfa..459c86c8fe 100644 --- a/src/activitypub/index.js +++ b/src/activitypub/index.js @@ -522,7 +522,7 @@ ActivityPub.record = async ({ id, type, actor }) => { await Promise.all([ db.sortedSetAdd(`activities:datetime`, now, id), - db.sortedSetAdd('domains:lastSeen', now, hostname), + ActivityPub.instances.log(hostname), analytics.increment(['activities', `activities:byType:${type}`, `activities:byHost:${hostname}`]), ]); }; diff --git a/test/activitypub/analytics.js b/test/activitypub/analytics.js index 85c8792115..9faf50ddb0 100644 --- a/test/activitypub/analytics.js +++ b/test/activitypub/analytics.js @@ -1,7 +1,7 @@ 'use strict'; -const nconf = require('nconf'); const assert = require('assert'); +const nconf = require('nconf'); const db = require('../../src/database'); const controllers = require('../../src/controllers'); @@ -105,7 +105,7 @@ describe('Analytics', () => { it('should increment the last seen time of that domain', async () => { const id = `https://example.org/activity/${utils.generateUUID()}`; - const before = await db.sortedSetScore('domains:lastSeen', 'example.org'); + const before = await db.sortedSetScore('instances:lastSeen', 'example.org'); await controllers.activitypub.postInbox({ body: { id, @@ -118,7 +118,7 @@ describe('Analytics', () => { }, }, { sendStatus: () => {} }); - const after = await db.sortedSetScore('domains:lastSeen', 'example.org'); + const after = await db.sortedSetScore('instances:lastSeen', 'example.org'); assert(before && after); assert(before < after); From 051043b6820feecc77ea9a885aa24608252426dc Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 25 Sep 2025 15:15:24 -0400 Subject: [PATCH 2/7] doc: 'nickname' and 'descriptionParsed' use in categories controller --- public/openapi/read/admin/manage/categories.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/openapi/read/admin/manage/categories.yaml b/public/openapi/read/admin/manage/categories.yaml index bbf8efb8fe..c4c48b7a06 100644 --- a/public/openapi/read/admin/manage/categories.yaml +++ b/public/openapi/read/admin/manage/categories.yaml @@ -25,8 +25,14 @@ get: description: A category identifier name: type: string + nickname: + type: string + description: A custom name given to a remote category for de-duplication purposes (not available to local categories.) description: type: string + descriptionParsed: + type: string + description: A variable-length description of the category (usually displayed underneath the category name). Unlike `description`, this value here will have been run through any parsers installed on the forum (e.g. Markdown) disabled: type: number icon: From 158780870062f47e2db4be26f7a845e1f3a223fa Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 25 Sep 2025 15:18:26 -0400 Subject: [PATCH 3/7] test: short OPs create Notes again --- test/activitypub/actors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/activitypub/actors.js b/test/activitypub/actors.js index 8c3c02e905..7fc90659a6 100644 --- a/test/activitypub/actors.js +++ b/test/activitypub/actors.js @@ -768,8 +768,8 @@ describe('Controllers', () => { assert.strictEqual(response.statusCode, 200); }); - it('should return a Article type object', () => { - assert.strictEqual(body.type, 'Article'); + it('should return a Note type object', () => { + assert.strictEqual(body.type, 'Note'); }); }); From 3bba9029320d88563986417d115d324f443e0d15 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 25 Sep 2025 15:29:10 -0400 Subject: [PATCH 4/7] test: more fixes for note vs. article --- test/activitypub/feps.js | 6 +++--- test/activitypub/notes.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/activitypub/feps.js b/test/activitypub/feps.js index 76b7d35cf6..1c97a282e8 100644 --- a/test/activitypub/feps.js +++ b/test/activitypub/feps.js @@ -63,20 +63,20 @@ describe('FEPs', () => { activitypub._sent.clear(); }); - it('should have federated out both Announce(Create(Article)) and Announce(Article)', () => { + it('should have federated out both Announce(Create(Note)) and Announce(Note)', () => { const activities = Array.from(activitypub._sent); const test1 = activities.some((activity) => { [, activity] = activity; return activity.type === 'Announce' && activity.object && activity.object.type === 'Create' && - activity.object.object && activity.object.object.type === 'Article'; + activity.object.object && activity.object.object.type === 'Note'; }); const test2 = activities.some((activity) => { [, activity] = activity; return activity.type === 'Announce' && - activity.object && activity.object.type === 'Article'; + activity.object && activity.object.type === 'Note'; }); assert(test1 && test2); diff --git a/test/activitypub/notes.js b/test/activitypub/notes.js index a00116fbb5..b43f2da49f 100644 --- a/test/activitypub/notes.js +++ b/test/activitypub/notes.js @@ -245,7 +245,7 @@ describe('Notes', () => { const { tid } = await api.topics.create({ uid }, { cid, title: utils.generateUUID(), - content: utils.generateUUID(), + content: 'Guaranteed to be more than 500 characters.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. In vel convallis felis. Phasellus porta erat a elit dignissim efficitur. Sed at sollicitudin erat, finibus sodales ante. Nunc ullamcorper, urna a pulvinar tempor, nunc risus venenatis nunc, id aliquam purus dui ut ante. Nulla sit amet risus sem. Praesent sit amet justo finibus, laoreet odio nec, varius diam. Nullam congue rhoncus lorem, eu accumsan leo aliquam sit amet. Suspendisse fringilla nec libero a tincidunt. Phasellus sapien justo, lacinia ac enim sit amet, pellentesque fermentum neque. Proin sit amet felis vitae libero aliquam pharetra at id nisi. Donec vitae mauris est. Sed hendrerit nisi et nibh auctor hendrerit. Praesent feugiat tortor a dignissim sagittis. Cras sit amet ante justo. Cras consectetur magna vitae volutpat placerat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae', }); assert(tid); From 9b00ff1e5202383d0e3e266c76f0a1f3a2bcc43f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 18:42:27 -0400 Subject: [PATCH 5/7] fix(deps): update dependency mongodb to v6.20.0 (#13665) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 13cce76075..0ab55f4641 100644 --- a/install/package.json +++ b/install/package.json @@ -91,7 +91,7 @@ "lru-cache": "11.2.2", "mime": "3.0.0", "mkdirp": "3.0.1", - "mongodb": "6.19.0", + "mongodb": "6.20.0", "morgan": "1.10.1", "mousetrap": "1.6.5", "multer": "2.0.2", From 13ce106b213bf0b614385567f2d5f53aff980887 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 19:01:50 -0400 Subject: [PATCH 6/7] chore(deps): update dependency lint-staged to v16.2.1 (#13672) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 0ab55f4641..62c2f75f8d 100644 --- a/install/package.json +++ b/install/package.json @@ -171,7 +171,7 @@ "grunt-contrib-watch": "1.1.0", "husky": "8.0.3", "jsdom": "27.0.0", - "lint-staged": "16.1.6", + "lint-staged": "16.2.1", "mocha": "11.7.2", "mocha-lcov-reporter": "1.3.0", "mockdate": "3.0.5", From 3370c06472c84fab5d36d4d0668c7d04e9b6ab8b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 19:18:05 -0400 Subject: [PATCH 7/7] chore(deps): update dependency @stylistic/eslint-plugin to v5.4.0 (#13671) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 62c2f75f8d..cc1bce4433 100644 --- a/install/package.json +++ b/install/package.json @@ -164,7 +164,7 @@ "@commitlint/config-angular": "19.8.1", "coveralls": "3.1.1", "@eslint/js": "9.35.0", - "@stylistic/eslint-plugin": "5.3.1", + "@stylistic/eslint-plugin": "5.4.0", "eslint-config-nodebb": "1.1.11", "eslint-plugin-import": "2.32.0", "grunt": "1.6.1",