From 41dd38afe8142aedb4d711b204f1faf9eb2b3217 Mon Sep 17 00:00:00 2001 From: Misty Release Bot Date: Wed, 23 Aug 2023 17:15:59 +0000 Subject: [PATCH 1/4] chore: incrementing version number - v3.3.7 --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index b9af985664..2b099f38b7 100644 --- a/install/package.json +++ b/install/package.json @@ -2,7 +2,7 @@ "name": "nodebb", "license": "GPL-3.0", "description": "NodeBB Forum", - "version": "3.3.6", + "version": "3.3.7", "homepage": "https://www.nodebb.org", "repository": { "type": "git", From 1193fa04f355fba99e2cef907a662e0780fea265 Mon Sep 17 00:00:00 2001 From: Misty Release Bot Date: Wed, 23 Aug 2023 17:16:00 +0000 Subject: [PATCH 2/4] chore: update changelog for v3.3.7 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index adbf0fbc2a..7054ec03c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ +#### v3.3.7 (2023-08-23) + +##### Chores + +* incrementing version number - v3.3.6 (7fb38792) +* update changelog for v3.3.6 (a43354c0) +* incrementing version number - v3.3.4 (a67f84ea) +* incrementing version number - v3.3.3 (f94d239b) +* incrementing version number - v3.3.2 (ec9dac97) +* incrementing version number - v3.3.1 (151cc68f) +* incrementing version number - v3.3.0 (fc1ad70f) +* incrementing version number - v3.2.3 (b06d3e63) +* incrementing version number - v3.2.2 (758ecfcd) +* incrementing version number - v3.2.1 (20145074) +* incrementing version number - v3.2.0 (9ecac38e) +* incrementing version number - v3.1.7 (0b4e81ab) +* incrementing version number - v3.1.6 (b3a3b130) +* incrementing version number - v3.1.5 (ec19343a) +* incrementing version number - v3.1.4 (2452783c) +* incrementing version number - v3.1.3 (3b4e9d3f) +* incrementing version number - v3.1.2 (40fa3489) +* incrementing version number - v3.1.1 (40250733) +* incrementing version number - v3.1.0 (0cb386bd) +* incrementing version number - v3.0.1 (26f6ea49) +* incrementing version number - v3.0.0 (224e08cd) + +##### Bug Fixes + +* closes #11945, fix skins loading if there are no custom skins (438c4c89) + #### v3.3.6 (2023-08-22) ##### Chores From 2d62a7724888378cd829936d2f1a4dd187a966ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 23 Aug 2023 18:07:05 -0400 Subject: [PATCH 3/4] fix: #11947, make user message has a numeric timestamp --- src/upgrades/3.3.0/chat_room_refactor.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/upgrades/3.3.0/chat_room_refactor.js b/src/upgrades/3.3.0/chat_room_refactor.js index 8ae39ee1dc..2585f1ad8b 100644 --- a/src/upgrades/3.3.0/chat_room_refactor.js +++ b/src/upgrades/3.3.0/chat_room_refactor.js @@ -40,22 +40,27 @@ module.exports = { const { roomId } = roomData; const uids = await db.getSortedSetRange(`chat:room:${roomId}:uids`, 0, -1); for (const uid of uids) { - await batch.processSortedSet(`uid:${uid}:chat:room:${roomId}:mids`, async (mids) => { - const uniqMids = mids.filter(mid => !midsSeen.hasOwnProperty(mid)); + await batch.processSortedSet(`uid:${uid}:chat:room:${roomId}:mids`, async (userMessageData) => { + const uniqMessages = userMessageData.filter(m => !midsSeen.hasOwnProperty(m.value)); + const uniqMids = uniqMessages.map(m => m.value); if (!uniqMids.length) { return; } let messageData = await db.getObjects(uniqMids.map(mid => `message:${mid}`)); messageData.forEach((m, idx) => { - if (m) { + if (m && uniqMessages[idx]) { m.mid = parseInt(uniqMids[idx], 10); + m.timestamp = m.timestamp || uniqMessages[idx].score || 0; } }); messageData = messageData.filter(Boolean); const bulkSet = messageData.map( - msg => [`message:${msg.mid}`, { roomId: roomId }] + msg => [`message:${msg.mid}`, { + roomId: roomId, + timestamp: m.timestamp, + }] ); await db.setObjectBulk(bulkSet); @@ -69,6 +74,7 @@ module.exports = { }); }, { batch: 500, + withScores: true, }); // eslint-disable-next-line no-await-in-loop await db.deleteAll(`uid:${uid}:chat:room:${roomId}:mids`); From 4ba7633897eebc0e635ba8d5d648655175f75916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 23 Aug 2023 18:19:39 -0400 Subject: [PATCH 4/4] fix: msg ref --- src/upgrades/3.3.0/chat_room_refactor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/upgrades/3.3.0/chat_room_refactor.js b/src/upgrades/3.3.0/chat_room_refactor.js index 2585f1ad8b..2ab8e73280 100644 --- a/src/upgrades/3.3.0/chat_room_refactor.js +++ b/src/upgrades/3.3.0/chat_room_refactor.js @@ -59,7 +59,7 @@ module.exports = { const bulkSet = messageData.map( msg => [`message:${msg.mid}`, { roomId: roomId, - timestamp: m.timestamp, + timestamp: msg.timestamp, }] );