Skip to content

Node.js based forum software built for the modern web

Merge remote-tracking branch 'origin/develop' into activitypub

Julian Lam45d2fe11dca0
diff --cc install/package.json
index f475bab278,d898af5f32..5ab76eb59d
--- a/install/package.json
+++ b/install/package.json
@@@ -101,17 -100,17 +101,17 @@@
"nodebb-plugin-2factor": "7.5.7",
"nodebb-plugin-composer-default": "10.2.43",
"nodebb-plugin-dbsearch": "6.2.5",
- "nodebb-plugin-emoji": "5.1.15",
- "nodebb-plugin-emoji-android": "4.0.0",
- "nodebb-plugin-markdown": "12.2.8",
- "nodebb-plugin-mentions": "4.4.5",
- "nodebb-plugin-ntfy": "1.7.7",
+ "nodebb-plugin-emoji": "6.0.1",
+ "nodebb-plugin-emoji-android": "4.1.1",
+ "nodebb-plugin-markdown": "13.0.0-pre.10",
+ "nodebb-plugin-mentions": "4.6.10",
"nodebb-plugin-spam-be-gone": "2.2.2",
+ "nodebb-plugin-web-push": "0.7.0",
"nodebb-rewards-essentials": "1.0.0",
- "nodebb-theme-harmony": "1.2.88",
+ "nodebb-theme-harmony": "2.0.0-pre.43",
"nodebb-theme-lavender": "7.1.16",
- "nodebb-theme-peace": "2.2.22",
+ "nodebb-theme-peace": "2.2.23",
- "nodebb-theme-persona": "13.3.56",
+ "nodebb-theme-persona": "14.0.0-pre.5",
"nodebb-widget-essentials": "7.0.31",
"nodemailer": "6.9.16",
"nprogress": "0.2.0",
diff --cc src/controllers/accounts/helpers.js
index 04705f1d10,2bf00215ae..3e1b1a8098
--- a/src/controllers/accounts/helpers.js
+++ b/src/controllers/accounts/helpers.js
@@@ -139,29 -129,7 +139,29 @@@ helpers.getUserDataByUserSlug = async f
return hookData.userData;
};
- helpers.getCustomUserFields = async function (userData) {
+ helpers.getCustomUserFields = async function (callerUID, userData) {
+ // Remote users' fields are serialized in hash
+ if (!utils.isNumber(userData.uid)) {
+ const customFields = await user.getUserField(userData.uid, 'customFields');
+ const fields = Array
+ .from(new URLSearchParams(customFields))
+ .reduce((memo, [name, value]) => {
+ const isUrl = validator.isURL(value);
+ memo.push({
+ key: slugify(name),
+ name,
+ value,
+ type: isUrl ? 'input-link' : 'input-text',
+ 'min-rep': '',
+ icon: 'fa-solid fa-circle-info',
+ });
+
+ return memo;
+ }, []);
+
+ return fields;
+ }
+
const keys = await db.getSortedSetRange('user-custom-fields', 0, -1);
const allFields = (await db.getObjects(keys.map(k => `user-custom-field:${k}`))).filter(Boolean);
diff --cc src/messaging/index.js
index 67b6346856,5bcda1c25a..0c8bd0eded
--- a/src/messaging/index.js
+++ b/src/messaging/index.js
@@@ -247,9 -246,7 +247,9 @@@ Messaging.generateUsernames = function
Messaging.generateChatWithMessage = async function (room, callerUid, userLang) {
const users = room.users.filter(u => u && parseInt(u.uid, 10) !== callerUid);
- const usernames = users.map(u => `<a href="${relative_path}/uid/${u.uid}">${u.displayname}</a>`);
+ const usernames = users.map(u => (utils.isNumber(u.uid) ?
- `<a href="${relative_path}/uid/${u.uid}">${u.username}</a>` :
- `<a href="${relative_path}/user/${u.username}">${u.username}</a>`));
++ `<a href="${relative_path}/uid/${u.uid}">${u.displayname}</a>` :
++ `<a href="${relative_path}/user/${u.username}">${u.displayname}</a>`));
let compiled = '';
if (!users.length) {
return '[[modules:chat.no-users-in-room]]';