From 76d28c7e58740db6f5bb70a2c1e55fa99e069bbd Mon Sep 17 00:00:00 2001 From: Misty Release Bot Date: Fri, 22 Dec 2023 15:36:17 +0000 Subject: [PATCH 01/12] chore: incrementing version number - v3.6.1 --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index c4e60cf54f..a28c43414e 100644 --- a/install/package.json +++ b/install/package.json @@ -2,7 +2,7 @@ "name": "nodebb", "license": "GPL-3.0", "description": "NodeBB Forum", - "version": "3.6.0", + "version": "3.6.1", "homepage": "https://www.nodebb.org", "repository": { "type": "git", From 1e4abdbfd29edfde8e2c9830435341bcebe7b7e6 Mon Sep 17 00:00:00 2001 From: Misty Release Bot Date: Fri, 22 Dec 2023 15:36:18 +0000 Subject: [PATCH 02/12] chore: update changelog for v3.6.1 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84f0853701..1d0b8e2fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,47 @@ +#### v3.6.1 (2023-12-22) + +##### Chores + +* incrementing version number - v3.6.0 (4cdf85f8) +* update changelog for v3.6.0 (eb92cee6) +* incrementing version number - v3.5.3 (ed0e8783) +* incrementing version number - v3.5.2 (52fbb2da) +* incrementing version number - v3.5.1 (4c543488) +* incrementing version number - v3.5.0 (d06fb4f0) +* incrementing version number - v3.4.3 (5c984250) +* incrementing version number - v3.4.2 (3f0dac38) +* incrementing version number - v3.4.1 (01e69574) +* incrementing version number - v3.4.0 (fd9247c5) +* incrementing version number - v3.3.9 (5805e770) +* incrementing version number - v3.3.8 (a5603565) +* incrementing version number - v3.3.7 (b26f1744) +* incrementing version number - v3.3.6 (7fb38792) +* 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 + +* #12243, don' set process.env.config if it doesnt exist (788404c1) +* lang key for move notification closes #12241 (48a2b5f7) +* dont send topic notification to poster (e72b26f5) + #### v3.6.0 (2023-12-20) ##### Chores From 563e03b6ae5cbf627c713f1e02ed0eca101cbc6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 23 Dec 2023 00:16:19 -0500 Subject: [PATCH 03/12] perf: dont load all followed tids on unread/recent?filter=watched --- src/topics/sorted.js | 13 ++++++++++++- src/topics/unread.js | 16 +++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/topics/sorted.js b/src/topics/sorted.js index a1d809fb48..8348f4ceaa 100644 --- a/src/topics/sorted.js +++ b/src/topics/sorted.js @@ -49,7 +49,7 @@ module.exports = function (Topics) { tids = await Topics.filterWatchedTids(tids, params.uid); } } else if (params.filter === 'watched') { - tids = await db.getSortedSetRevRange(`uid:${params.uid}:followed_tids`, 0, -1); + tids = await getWatchedTopics(params); } else if (params.cids) { tids = await getCidTids(params); } else if (params.tags.length) { @@ -63,6 +63,17 @@ module.exports = function (Topics) { return tids; } + async function getWatchedTopics(params) { + const sortSet = ['recent', 'old'].includes(params.sort) ? 'topics:recent' : `topics:${params.sort}`; + const method = params.sort === 'old' ? 'getSortedSetIntersect' : 'getSortedSetRevIntersect'; + return await db[method]({ + sets: [sortSet, `uid:${params.uid}:followed_tids`], + weights: [1, 0], + start: 0, + stop: meta.config.recentMaxTopics - 1, + }); + } + async function getTagTids(params) { const sets = [ params.sort === 'old' ? diff --git a/src/topics/unread.js b/src/topics/unread.js index 9c54445233..bb8e207163 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -210,15 +210,13 @@ module.exports = function (Topics) { } async function getFollowedTids(params) { - let tids = await db.getSortedSetMembers(`uid:${params.uid}:followed_tids`); - const filterCids = params.cid && params.cid.map(cid => parseInt(cid, 10)); - if (filterCids) { - const topicData = await Topics.getTopicsFields(tids, ['tid', 'cid']); - tids = topicData.filter(t => filterCids.includes(t.cid)).map(t => t.tid); - } - const scores = await db.sortedSetScores('topics:recent', tids); - const data = tids.map((tid, index) => ({ value: String(tid), score: scores[index] })); - return data.filter(item => item.score > params.cutoff); + const keys = params.cid ? + params.cid.map(cid => `cid:${cid}:tids:lastposttime`) : + 'topics:recent'; + + const recentTopicData = await db.getSortedSetRevRangeByScoreWithScores(keys, 0, -1, '+inf', params.cutoff); + const isFollowed = await db.isSortedSetMembers(`uid:${params.uid}:followed_tids`, recentTopicData.map(t => t.tid)); + return recentTopicData.filter((t, i) => isFollowed[i]); } async function filterTidsThatHaveBlockedPosts(params) { From a74b51415c41f8f50b696d74a1db731bd34e80dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 23 Dec 2023 17:58:03 -0500 Subject: [PATCH 04/12] fix: stricter selector for sort --- public/src/modules/sort.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/modules/sort.js b/public/src/modules/sort.js index c7e5e8900a..2fcbb67897 100644 --- a/public/src/modules/sort.js +++ b/public/src/modules/sort.js @@ -12,8 +12,8 @@ define('sort', ['components'], function (components) { currentSetting.find('i').addClass('fa-check'); $('body') - .off('click', '[component="thread/sort"] a') - .on('click', '[component="thread/sort"] a', function () { + .off('click', '[component="thread/sort"] a[data-sort]') + .on('click', '[component="thread/sort"] a[data-sort]', function () { const newSetting = $(this).attr('data-sort'); const urlParams = utils.params(); urlParams.sort = newSetting; From 8867f243e8ebb1712c16b5d9c154df7de3b97aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 27 Dec 2023 17:43:56 -0500 Subject: [PATCH 05/12] fix: closes #12246, direction is passed in as string as query param with new api call cid isn't necessary in query params since its in path --- public/src/client/category.js | 1 - src/api/categories.js | 2 +- src/socket.io/topics/infinitescroll.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/public/src/client/category.js b/public/src/client/category.js index c452273761..b4f0bb50cb 100644 --- a/public/src/client/category.js +++ b/public/src/client/category.js @@ -127,7 +127,6 @@ define('forum/category', [ hooks.fire('action:topics.loading'); const params = utils.params(); infinitescroll.loadMore(`/categories/${ajaxify.data.cid}/topics`, { - cid: ajaxify.data.cid, after: after, direction: direction, query: params, diff --git a/src/api/categories.js b/src/api/categories.js index 892c8e3d6a..db682fb245 100644 --- a/src/api/categories.js +++ b/src/api/categories.js @@ -128,7 +128,7 @@ categoriesAPI.getTopics = async (caller, data) => { let start = Math.max(0, parseInt(data.after || 0, 10)); - if (data.direction === -1) { + if (parseInt(data.direction, 10) === -1) { start -= infScrollTopicsPerPage; } diff --git a/src/socket.io/topics/infinitescroll.js b/src/socket.io/topics/infinitescroll.js index 2e9e95948e..cb0814d329 100644 --- a/src/socket.io/topics/infinitescroll.js +++ b/src/socket.io/topics/infinitescroll.js @@ -30,7 +30,7 @@ module.exports = function (SocketTopics) { parseInt(data.count, 10) || meta.config.postsPerPage || 20 )); - if (data.direction === -1) { + if (parseInt(data.direction, 10) === -1) { start -= infScrollPostsPerPage; } From 0af19afd2e1cb1d0e4443bfa91b548ecf3a381f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 27 Dec 2023 18:31:56 -0500 Subject: [PATCH 06/12] feat: #12247 --- public/src/client/topic/events.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/client/topic/events.js b/public/src/client/topic/events.js index 7dd6b5c08f..e091dd69c8 100644 --- a/public/src/client/topic/events.js +++ b/public/src/client/topic/events.js @@ -10,7 +10,8 @@ define('forum/topic/events', [ 'components', 'translator', 'hooks', -], function (postTools, threadTools, posts, images, components, translator, hooks) { + 'helpers', +], function (postTools, threadTools, posts, images, components, translator, hooks, helpers) { const Events = {}; const events = { @@ -152,7 +153,7 @@ define('forum/topic/events', [ editorEl.replaceWith(html); postContainer.find('[component="post/edit-indicator"]') .removeClass('hidden') - .translateAttr('title', `[[global:edited-timestamp, ${editData.editedISO}]]`); + .translateAttr('title', `[[global:edited-timestamp, ${helpers.isoTimeToLocaleString(editData.editedISO, config.userLang)}]]`); postContainer.find('[component="post/editor"] .timeago').timeago(); hooks.fire('action:posts.edited', data); }); From 980bfee88fdb1ac2280e76521ce843fe7179ed11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 27 Dec 2023 18:34:07 -0500 Subject: [PATCH 07/12] chore: up themes --- install/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/package.json b/install/package.json index a28c43414e..78f146d5c3 100644 --- a/install/package.json +++ b/install/package.json @@ -103,10 +103,10 @@ "nodebb-plugin-ntfy": "1.7.3", "nodebb-plugin-spam-be-gone": "2.2.0", "nodebb-rewards-essentials": "1.0.0", - "nodebb-theme-harmony": "1.1.105", - "nodebb-theme-lavender": "7.1.5", - "nodebb-theme-peace": "2.1.25", - "nodebb-theme-persona": "13.2.49", + "nodebb-theme-harmony": "1.1.106", + "nodebb-theme-lavender": "7.1.6", + "nodebb-theme-peace": "2.1.26", + "nodebb-theme-persona": "13.2.50", "nodebb-widget-essentials": "7.0.14", "nodemailer": "6.9.7", "nprogress": "0.2.0", From 16f0affa701fbc1b89745386d709c39179caca24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 29 Dec 2023 11:49:44 -0500 Subject: [PATCH 08/12] chore: up lavender --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 78f146d5c3..1049921402 100644 --- a/install/package.json +++ b/install/package.json @@ -104,7 +104,7 @@ "nodebb-plugin-spam-be-gone": "2.2.0", "nodebb-rewards-essentials": "1.0.0", "nodebb-theme-harmony": "1.1.106", - "nodebb-theme-lavender": "7.1.6", + "nodebb-theme-lavender": "7.1.7", "nodebb-theme-peace": "2.1.26", "nodebb-theme-persona": "13.2.50", "nodebb-widget-essentials": "7.0.14", From b6dbe1a6d68d9ea0fd9ee9681b2955a2efc2523c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 1 Jan 2024 21:22:51 -0500 Subject: [PATCH 09/12] chore: up harmony --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 1049921402..000a92b8c6 100644 --- a/install/package.json +++ b/install/package.json @@ -103,7 +103,7 @@ "nodebb-plugin-ntfy": "1.7.3", "nodebb-plugin-spam-be-gone": "2.2.0", "nodebb-rewards-essentials": "1.0.0", - "nodebb-theme-harmony": "1.1.106", + "nodebb-theme-harmony": "1.1.107", "nodebb-theme-lavender": "7.1.7", "nodebb-theme-peace": "2.1.26", "nodebb-theme-persona": "13.2.50", From 2bed405cd50241afb9fe2843917c92bbfed186e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 4 Jan 2024 12:59:33 -0500 Subject: [PATCH 10/12] chore: up harmony --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 000a92b8c6..1d370dc97f 100644 --- a/install/package.json +++ b/install/package.json @@ -103,7 +103,7 @@ "nodebb-plugin-ntfy": "1.7.3", "nodebb-plugin-spam-be-gone": "2.2.0", "nodebb-rewards-essentials": "1.0.0", - "nodebb-theme-harmony": "1.1.107", + "nodebb-theme-harmony": "1.1.108", "nodebb-theme-lavender": "7.1.7", "nodebb-theme-peace": "2.1.26", "nodebb-theme-persona": "13.2.50", From d3d6d77d1e3433a0865ef4d21628d650a564f33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 5 Jan 2024 16:15:13 -0500 Subject: [PATCH 11/12] fix: recent loading --- public/src/client/chats/recent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/chats/recent.js b/public/src/client/chats/recent.js index 02da563286..b9b7e1b678 100644 --- a/public/src/client/chats/recent.js +++ b/public/src/client/chats/recent.js @@ -35,7 +35,7 @@ define('forum/chats/recent', ['alerts', 'api', 'chat'], function (alerts, api, c return; } recentChats.attr('loading', 1); - app.get(`/chats`, { + api.get(`/chats`, { uid: ajaxify.data.uid, after: recentChats.attr('data-nextstart'), }).then(({ rooms, nextStart }) => { From ef8f8db7bd91f8f0988a2dbe57a5141ade806c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 6 Jan 2024 22:30:27 -0500 Subject: [PATCH 12/12] chore: up composer --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 1d370dc97f..a8c3e80048 100644 --- a/install/package.json +++ b/install/package.json @@ -94,7 +94,7 @@ "multiparty": "4.2.3", "nconf": "0.12.1", "nodebb-plugin-2factor": "7.4.0", - "nodebb-plugin-composer-default": "10.2.29", + "nodebb-plugin-composer-default": "10.2.31", "nodebb-plugin-dbsearch": "6.2.3", "nodebb-plugin-emoji": "5.1.13", "nodebb-plugin-emoji-android": "4.0.0",