Compare commits

...

27 Commits

Author SHA1 Message Date
renovate[bot]
cef6abb0d0 fix(deps): update dependency yargs to v18 2025-12-03 15:15:58 +00:00
renovate[bot]
76b6b3b259 chore(deps): update dependency lint-staged to v16.2.7 (#13785)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-03 10:14:33 -05:00
Barış Soner Uşaklı
4cdb56904c Merge branch 'master' into develop 2025-12-03 10:14:13 -05:00
Barış Soner Uşaklı
70169758ec Merge branch 'master' into develop 2025-12-03 09:49:22 -05:00
renovate[bot]
7f21a17175 chore(deps): update actions/checkout action to v6 (#13802)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 14:41:12 -05:00
renovate[bot]
93057306f4 fix(deps): update dependency ace-builds to v1.43.5 (#13797)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 14:36:08 -05:00
renovate[bot]
731933a66b fix(deps): update dependency lru-cache to v11.2.4 (#13798)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 14:35:46 -05:00
renovate[bot]
38321220f2 fix(deps): update dependency express to v4.22.1 (#13800)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 14:35:32 -05:00
renovate[bot]
ad5cd27b37 fix(deps): update dependency ipaddr.js to v2.3.0 (#13801)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 14:27:07 -05:00
renovate[bot]
ecec1f4594 fix(deps): update dependency nodemailer to v7.0.11 (#13799)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 14:26:50 -05:00
Julian Lam
3b7bcba6c0 fix: have notes.assert call out.announce.topic only if uid is set (so, if note assertion is called via search; manual pull) 2025-12-02 14:15:13 -05:00
Julian Lam
a82e1f441c debug: still broken... more debug logs 2025-12-02 13:50:50 -05:00
Julian Lam
977a67f4cd fix: deep clone activity prop before execution; feps.announce 2025-12-02 13:42:06 -05:00
Julian Lam
8236b594af debug: log mock results 2025-12-02 13:19:48 -05:00
Barış Soner Uşaklı
22d3c52332 test: log label 2025-12-02 12:59:28 -05:00
Barış Soner Uşaklı
e39c91497f test: log activities 2025-12-02 12:47:47 -05:00
Barış Soner Uşaklı
841bd8252c test: on test fail show activities 2025-12-02 11:54:14 -05:00
renovate[bot]
5ba6bea049 fix(deps): update dependency cron to v4.3.5 (#13796)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 11:44:46 -05:00
renovate[bot]
624ef61655 fix(deps): update dependency body-parser to v2.2.1 (#13795)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 11:44:29 -05:00
Barış Uşaklı
287b25695d test: new mongodb deps (#13793) 2025-12-02 11:08:20 -05:00
renovate[bot]
5f55ca85e6 fix(deps): update dependency @isaacs/ttlcache to v2.1.3 (#13791)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 09:50:11 -05:00
renovate[bot]
1cb8b381d5 fix(deps): update dependency sass to v1.94.2 (#13786)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-01 18:53:29 -05:00
renovate[bot]
1bcfe3f09e fix(deps): update dependency redis to v5.10.0 (#13787)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-01 18:53:11 -05:00
Barış Soner Uşaklı
936dede44f Merge branch 'master' into develop 2025-12-01 11:15:23 -05:00
Julian Lam
3ab61615af feat: federate out topic removal activities when topic is deleted and purged from a local category 2025-12-01 11:11:27 -05:00
Julian Lam
411baa21f4 fix: minor comment fix 2025-12-01 10:25:32 -05:00
Julian Lam
c365c1dc3e fix: publish postingRestrictedToMods property in group actor 2025-11-26 12:29:48 -05:00
10 changed files with 52 additions and 32 deletions

View File

@@ -37,7 +37,7 @@ jobs:
platform=${{ matrix.platforms }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
echo "IMAGE=ghcr.io/${GITHUB_REPOSITORY@L}" >> $GITHUB_ENV
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

View File

@@ -81,7 +81,7 @@ jobs:
- 27017:27017
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- run: cp install/package.json package.json

View File

@@ -33,19 +33,19 @@
"@fontsource/inter": "5.2.8",
"@fontsource/poppins": "5.2.7",
"@fortawesome/fontawesome-free": "6.7.2",
"@isaacs/ttlcache": "2.1.2",
"@isaacs/ttlcache": "2.1.3",
"@nodebb/spider-detector": "2.0.3",
"@popperjs/core": "2.11.8",
"@textcomplete/contenteditable": "0.1.13",
"@textcomplete/core": "0.1.13",
"@textcomplete/textarea": "0.1.13",
"ace-builds": "1.43.4",
"ace-builds": "1.43.5",
"archiver": "7.0.1",
"async": "3.2.6",
"autoprefixer": "10.4.22",
"bcryptjs": "3.0.3",
"benchpressjs": "2.5.5",
"body-parser": "2.2.0",
"body-parser": "2.2.1",
"bootbox": "6.0.4",
"bootstrap": "5.3.8",
"bootswatch": "5.3.8",
@@ -57,17 +57,17 @@
"compare-versions": "6.1.1",
"compression": "1.8.1",
"connect-flash": "0.1.1",
"connect-mongo": "5.1.0",
"connect-mongo": "6.0.0",
"connect-pg-simple": "10.0.0",
"connect-redis": "9.0.0",
"cookie-parser": "1.4.7",
"cron": "4.3.4",
"cron": "4.3.5",
"cropperjs": "1.6.2",
"csrf-sync": "4.2.1",
"daemon": "1.1.0",
"diff": "8.0.2",
"esbuild": "0.27.0",
"express": "4.21.2",
"express": "4.22.1",
"express-session": "1.18.2",
"express-useragent": "2.0.2",
"fetch-cookie": "3.1.0",
@@ -77,7 +77,7 @@
"helmet": "7.2.0",
"html-to-text": "9.0.5",
"imagesloaded": "5.0.0",
"ipaddr.js": "2.2.0",
"ipaddr.js": "2.3.0",
"jquery": "3.7.1",
"jquery-deserialize": "2.0.0",
"jquery-form": "4.3.0",
@@ -88,10 +88,10 @@
"jsonwebtoken": "9.0.2",
"lodash": "4.17.21",
"logrotate-stream": "0.2.9",
"lru-cache": "11.2.2",
"lru-cache": "11.2.4",
"mime": "3.0.0",
"mkdirp": "3.0.1",
"mongodb": "6.21.0",
"mongodb": "7.0.0",
"morgan": "1.10.1",
"mousetrap": "1.6.5",
"multer": "2.0.2",
@@ -112,7 +112,7 @@
"nodebb-theme-peace": "2.2.49",
"nodebb-theme-persona": "14.1.18",
"nodebb-widget-essentials": "7.0.40",
"nodemailer": "7.0.10",
"nodemailer": "7.0.11",
"nprogress": "0.2.0",
"passport": "0.7.0",
"passport-http-bearer": "1.0.1",
@@ -124,12 +124,12 @@
"pretty": "^2.0.0",
"progress-webpack-plugin": "1.0.16",
"prompt": "1.3.0",
"redis": "5.9.0",
"redis": "5.10.0",
"rimraf": "6.1.2",
"rss": "1.2.2",
"rtlcss": "4.3.0",
"sanitize-html": "2.17.0",
"sass": "1.94.1",
"sass": "1.94.2",
"satori": "0.18.3",
"sbd": "^1.0.19",
"semver": "7.7.3",
@@ -156,7 +156,7 @@
"workerpool": "10.0.1",
"xml": "1.0.1",
"xregexp": "5.1.2",
"yargs": "17.7.2",
"yargs": "18.0.0",
"zxcvbn": "4.4.2"
},
"devDependencies": {
@@ -172,7 +172,7 @@
"grunt-contrib-watch": "1.1.0",
"husky": "8.0.3",
"jsdom": "27.2.0",
"lint-staged": "16.2.6",
"lint-staged": "16.2.7",
"mocha": "11.7.5",
"mocha-lcov-reporter": "1.3.0",
"mockdate": "3.0.5",

View File

@@ -147,7 +147,7 @@ Actors.assert = async (ids, options = {}) => {
categories.add(actor.id);
}
}
if (
!typeOk ||
!activitypub._constants.requiredActorProps.every(prop => actor.hasOwnProperty(prop))
@@ -351,7 +351,7 @@ Actors.assertGroup = async (ids, options = {}) => {
}));
groups = groups.filter(Boolean); // remove unresolvable actors
// Build userData object for storage
// Build categoryData object for storage
const categoryObjs = (await activitypub.mocks.category(groups)).filter(Boolean);
const now = Date.now();

View File

@@ -13,6 +13,7 @@ const categories = require('../categories');
const posts = require('../posts');
const topics = require('../topics');
const messaging = require('../messaging');
const privileges = require('../privileges');
const plugins = require('../plugins');
const slugify = require('../slugify');
const translator = require('../translator');
@@ -524,12 +525,19 @@ Mocks.actors.user = async (uid) => {
};
Mocks.actors.category = async (cid) => {
const {
name, handle: preferredUsername, slug,
descriptionParsed: summary, backgroundImage,
} = await categories.getCategoryFields(cid,
['name', 'handle', 'slug', 'description', 'descriptionParsed', 'backgroundImage']);
const publicKey = await activitypub.getPublicKey('cid', cid);
const [
{
name, handle: preferredUsername, slug,
descriptionParsed: summary, backgroundImage,
},
publicKey,
canPost,
] = await Promise.all([
categories.getCategoryFields(cid,
['name', 'handle', 'slug', 'description', 'descriptionParsed', 'backgroundImage']),
activitypub.getPublicKey('cid', cid),
privileges.categories.can('topics:create', cid, -2),
]);
let icon;
if (backgroundImage) {
@@ -567,6 +575,7 @@ Mocks.actors.category = async (cid) => {
summary,
// image, // todo once categories have cover photos
icon,
postingRestrictedToMods: !canPost,
publicKey: {
id: `${nconf.get('url')}/category/${cid}#key`,

View File

@@ -265,8 +265,8 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
await Notes.syncUserInboxes(tid, uid);
if (!hasTid && options.cid) {
// New topic, have category announce it
if (!hasTid && uid && options.cid) {
// New topic via search/post-redirect, have category announce it
activitypub.out.announce.topic(tid);
}

View File

@@ -7,6 +7,7 @@ const posts = require('../posts');
const privileges = require('../privileges');
const plugins = require('../plugins');
const activitypub = require('../activitypub');
const utils = require('../utils');
const socketHelpers = require('../socket.io/helpers');
const websockets = require('../socket.io');
const events = require('../events');
@@ -66,11 +67,22 @@ exports.doTopicAction = async function (action, event, caller, { tids }) {
const uids = await user.getUidsFromSet('users:online', 0, -1);
await Promise.all(tids.map(async (tid) => {
const title = await topics.getTopicField(tid, 'title');
const { title, cid, mainPid } = await topics.getTopicFields(tid, ['title', 'cid', 'mainPid']);
const data = await topics.tools[action](tid, caller.uid);
const notifyUids = await privileges.categories.filterUids('topics:read', data.cid, uids);
socketHelpers.emitToUids(event, data, notifyUids);
await logTopicAction(action, caller, tid, title);
switch(action) {
case 'delete': // falls through
case 'purge': {
if (utils.isNumber(cid) && parseInt(cid, 10) > 0) {
activitypub.out.remove.context(caller.uid, tid); // 7888-style
activitypub.out.delete.note(caller.uid, mainPid); // 1b12-style
activitypub.out.undo.announce('cid', cid, tid); // microblogs
}
}
}
}));
};

View File

@@ -324,13 +324,12 @@ topicsAPI.move = async (caller, { tid, cid }) => {
if (utils.isNumber(cid) && parseInt(cid, 10) === -1) {
activitypub.out.remove.context(caller.uid, tid); // 7888-style
activitypub.out.delete.note(caller.uid, topicData.mainPid); // threadiverse
// tbd: activitypubApi.undo.announce? // microblogs
activitypub.out.delete.note(caller.uid, topicData.mainPid); // 1b12-style
} else {
activitypub.out.move.context(caller.uid, tid);
activitypub.out.announce.topic(tid);
}
activitypub.out.undo.announce('cid', topicData.cid, tid);
activitypub.out.undo.announce('cid', topicData.cid, tid); // microblogs
}
await events.log({

View File

@@ -65,7 +65,7 @@ mongoModule.init = async function (opts) {
};
mongoModule.createSessionStore = async function (options) {
const MongoStore = require('connect-mongo');
const { MongoStore } = require('connect-mongo');
const meta = require('../meta');
const store = MongoStore.create({

View File

@@ -164,6 +164,7 @@ describe('FEPs', () => {
});
pid = id;
({ activity } = await helpers.mocks.create(note));
await activitypub.inbox.create({ body: activity });
const activities = Array.from(activitypub._sent);
@@ -180,7 +181,6 @@ describe('FEPs', () => {
return activity.type === 'Announce' &&
activity.object && activity.object.type === 'Note';
});
assert(test1 && test2);
});