mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-29 11:50:36 +01:00
Compare commits
27 Commits
v4.7.2
...
renovate/y
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cef6abb0d0 | ||
|
|
76b6b3b259 | ||
|
|
4cdb56904c | ||
|
|
70169758ec | ||
|
|
7f21a17175 | ||
|
|
93057306f4 | ||
|
|
731933a66b | ||
|
|
38321220f2 | ||
|
|
ad5cd27b37 | ||
|
|
ecec1f4594 | ||
|
|
3b7bcba6c0 | ||
|
|
a82e1f441c | ||
|
|
977a67f4cd | ||
|
|
8236b594af | ||
|
|
22d3c52332 | ||
|
|
e39c91497f | ||
|
|
841bd8252c | ||
|
|
5ba6bea049 | ||
|
|
624ef61655 | ||
|
|
287b25695d | ||
|
|
5f55ca85e6 | ||
|
|
1cb8b381d5 | ||
|
|
1bcfe3f09e | ||
|
|
936dede44f | ||
|
|
3ab61615af | ||
|
|
411baa21f4 | ||
|
|
c365c1dc3e |
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -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
|
||||
|
||||
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
@@ -81,7 +81,7 @@ jobs:
|
||||
- 27017:27017
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- run: cp install/package.json package.json
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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`,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user