Merge branch 'master' into develop

This commit is contained in:
Barış Soner Uşaklı
2025-09-08 09:37:54 -04:00
4 changed files with 95 additions and 47 deletions

View File

@@ -1,3 +1,45 @@
#### v4.5.1 (2025-09-04)
##### Chores
* up dbsearch (c07e81d2)
* incrementing version number - v4.5.0 (f05c5d06)
* update changelog for v4.5.0 (86d03b1e)
* incrementing version number - v4.4.6 (074043ad)
* incrementing version number - v4.4.5 (6f106923)
* incrementing version number - v4.4.4 (d323af44)
* incrementing version number - v4.4.3 (d354c2eb)
* incrementing version number - v4.4.2 (55c510ae)
* incrementing version number - v4.4.1 (5ae79b4e)
* incrementing version number - v4.4.0 (0a75eee3)
* incrementing version number - v4.3.2 (b92b5d80)
* incrementing version number - v4.3.1 (308e6b9f)
* incrementing version number - v4.3.0 (bff291db)
* incrementing version number - v4.2.2 (17fecc24)
* incrementing version number - v4.2.1 (852a270c)
* incrementing version number - v4.2.0 (87581958)
* incrementing version number - v4.1.1 (b2afbb16)
* incrementing version number - v4.1.0 (36c80850)
* incrementing version number - v4.0.6 (4a52fb2e)
* incrementing version number - v4.0.5 (1792a62b)
* incrementing version number - v4.0.4 (b1125cce)
* incrementing version number - v4.0.3 (2b65c735)
* incrementing version number - v4.0.2 (73fe5fcf)
* incrementing version number - v4.0.1 (a461b758)
* incrementing version number - v4.0.0 (c1eaee45)
##### New Features
* use _variables.scss overrides from acp in custom skins and bootswatch skins as well (0c48e0e9)
##### Bug Fixes
* remove unused dependency (8d7e3537)
* remove test for 1b12 announce on topic move (as this no longer occurs) (9221d34f)
* use existing id if checkHeader returns false (e6996846)
* regression that caused Piefed (or potentially others) content to be dropped on receipt (86d9016f)
* remove faulty code that tried to announce a remote object but couldn't as the ID was not a number (7adfe39e)
#### v4.5.0 (2025-09-03)
##### Chores

View File

@@ -2,7 +2,7 @@
"name": "nodebb",
"license": "GPL-3.0",
"description": "NodeBB Forum",
"version": "4.5.0",
"version": "4.5.1",
"homepage": "https://www.nodebb.org",
"repository": {
"type": "git",

View File

@@ -71,7 +71,7 @@ connection.connect = async function (options) {
});
if (options.password) {
cxn.auth(options.password);
cxn.auth({ password: options.password });
}
});
};

View File

@@ -1,5 +1,7 @@
'use strict';
const winston = require('winston');
const meta = require('../../meta');
const userDigest = require('../../user/digest');
const userEmail = require('../../user/email');
@@ -14,55 +16,59 @@ Email.test = async function (socket, data) {
...(data.payload || {}),
subject: '[[email:test-email.subject]]',
};
try {
switch (data.template) {
case 'digest':
await userDigest.execute({
interval: 'month',
subscribers: [socket.uid],
});
break;
switch (data.template) {
case 'digest':
await userDigest.execute({
interval: 'month',
subscribers: [socket.uid],
});
break;
case 'banned':
Object.assign(payload, {
username: 'test-user',
until: utils.toISOString(Date.now()),
reason: 'Test Reason',
});
await emailer.send(data.template, socket.uid, payload);
break;
case 'banned':
Object.assign(payload, {
username: 'test-user',
until: utils.toISOString(Date.now()),
reason: 'Test Reason',
});
await emailer.send(data.template, socket.uid, payload);
break;
case 'verify-email':
case 'welcome':
await userEmail.sendValidationEmail(socket.uid, {
force: 1,
template: data.template,
subject: data.template === 'welcome' ? `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]` : undefined,
});
break;
case 'verify-email':
case 'welcome':
await userEmail.sendValidationEmail(socket.uid, {
force: 1,
template: data.template,
subject: data.template === 'welcome' ? `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]` : undefined,
});
break;
case 'notification': {
const notification = await notifications.create({
type: 'test',
bodyShort: '[[email:notif.test.short]]',
bodyLong: '[[email:notif.test.long]]',
nid: `uid:${socket.uid}:test`,
path: '/',
from: socket.uid,
});
await emailer.send('notification', socket.uid, {
path: notification.path,
subject: utils.stripHTMLTags(notification.subject || '[[notifications:new-notification]]'),
intro: utils.stripHTMLTags(notification.bodyShort),
body: notification.bodyLong || '',
notification,
showUnsubscribe: true,
});
break;
}
case 'notification': {
const notification = await notifications.create({
type: 'test',
bodyShort: '[[email:notif.test.short]]',
bodyLong: '[[email:notif.test.long]]',
nid: `uid:${socket.uid}:test`,
path: '/',
from: socket.uid,
});
await emailer.send('notification', socket.uid, {
path: notification.path,
subject: utils.stripHTMLTags(notification.subject || '[[notifications:new-notification]]'),
intro: utils.stripHTMLTags(notification.bodyShort),
body: notification.bodyLong || '',
notification,
showUnsubscribe: true,
});
break;
default:
await emailer.send(data.template, socket.uid, payload);
break;
}
default:
await emailer.send(data.template, socket.uid, payload);
break;
} catch (err) {
winston.error(err.stack);
throw err;
}
};