Merge branch 'master' into develop

This commit is contained in:
Barış Soner Uşaklı
2025-04-12 14:16:58 -04:00
7 changed files with 35 additions and 22 deletions

View File

@@ -1,3 +1,34 @@
#### v4.2.1 (2025-04-10)
##### Chores
* up harmony (d161eb6f)
* up persona (2237e17a)
* up persona (75f1f6fb)
* incrementing version number - v4.2.0 (87581958)
* update changelog for v4.2.0 (c9e0198d)
* 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)
##### Bug Fixes
* closes #13317, fix email confirm for changing email (33d50637)
* check if latestversion is valid before using semver.gt (6fe066ce)
* closes #13256, allow keyboard access to icon colors (c6620170)
##### Refactors
* get rid of async.parallel (e722e869)
* remove pointless true (747457d7)
* make register intro heading (c258f597)
#### v4.2.0 (2025-03-19)
##### Chores

View File

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

View File

@@ -83,7 +83,6 @@
"email-confirmed": "Email Confirmed",
"email-confirmed-message": "Thank you for validating your email. Your account is now fully activated.",
"email-confirm-error-message": "There was a problem validating your email address. Perhaps the code was invalid or has expired.",
"email-confirm-error-message-already-validated": "Your email address was already validated.",
"email-confirm-sent": "Confirmation email sent.",
"none": "None",

View File

@@ -24,9 +24,6 @@ get:
error:
type: string
description: Translation key for client-side localisation
alreadyValidated:
type: boolean
description: set to true if the email was already validated
required:
- title
- $ref: ../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -235,12 +235,6 @@ Controllers.confirmEmail = async (req, res) => {
return renderPage();
}
try {
if (req.loggedIn) {
const emailValidated = await user.getUserField(req.uid, 'email:confirmed');
if (emailValidated) {
return renderPage({ alreadyValidated: true });
}
}
await user.email.confirmByCode(req.params.code, req.session.id);
if (req.session.registration) {
// After confirmation, no need to send user back to email change form

View File

@@ -58,11 +58,8 @@ module.exports = function (User) {
]);
}
const [followingCount, followingRemoteCount, followerCount, followerRemoteCount] = await Promise.all([
db.sortedSetCard(`following:${uid}`),
db.sortedSetCard(`followingRemote:${uid}`),
db.sortedSetCard(`followers:${theiruid}`),
db.sortedSetCard(`followersRemote:${theiruid}`),
const [followingCount, followingRemoteCount, followerCount, followerRemoteCount] = await db.sortedSetsCard([
`following:${uid}`, `followingRemote:${uid}`, `followers:${theiruid}`, `followersRemote:${theiruid}`,
]);
await Promise.all([
User.setUserField(uid, 'followingCount', followingCount + followingRemoteCount),

View File

@@ -1,14 +1,9 @@
{{{ if alreadyValidated }}}
<div class="alert alert-info">
<p>[[notifications:email-confirm-error-message-already-validated]]</p>
{{{ end }}}
{{{ if error }}}
<div class="alert alert-warning">
<p>[[notifications:email-confirm-error-message]]</p>
{{{ end }}}
{{{ if (!error && !alreadyValidated )}}}
{{{ if !error }}}
<div class="alert alert-success">
<strong>[[notifications:email-confirmed]]</strong>
<p>[[notifications:email-confirmed-message]]</p>