From e39a898383be4185590164abecdfee8f6ea83669 Mon Sep 17 00:00:00 2001 From: Misty Release Bot Date: Wed, 6 Sep 2023 13:41:30 +0000 Subject: [PATCH 1/4] chore: incrementing version number - v3.4.0 --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index a6e8d44e71..141a2dea79 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.9", + "version": "3.4.0", "homepage": "https://www.nodebb.org", "repository": { "type": "git", From 5c023025b4ffab53e6529204df332087030a35e6 Mon Sep 17 00:00:00 2001 From: Misty Release Bot Date: Wed, 6 Sep 2023 13:41:31 +0000 Subject: [PATCH 2/4] chore: update changelog for v3.4.0 --- CHANGELOG.md | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d217dcea0b..3c7456e2ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,145 @@ +#### v3.4.0 (2023-09-06) + +##### Chores + +* up ntfy (d79f79e8) +* up dbsearch (6d27f778) +* up themes, dont send typing on page load (45ed12c5) +* up harmony (21ad49fe) +* up themes (e10a5fa5) +* up themes (8132d36b) +* up themes (10d11924) +* up harmony (0334b389) +* up harmony (32c870f4) +* incrementing version number - v3.3.9 (5805e770) +* update changelog for v3.3.9 (50d44777) +* up composer (ffd6ea5a) +* up composer (c2534287) +* up composer (540b9f18) +* up composer (87015e9b) +* up themes (dd3647ed) +* incrementing version number - v3.3.8 (a5603565) +* incrementing version number - v3.3.7 (b26f1744) +* markdown dep (03f11a24) +* up markdown (f399db9d) +* incrementing version number - v3.3.6 (7fb38792) +* up deps (a7843a40) +* up composer (05a7c761) +* up themes (c4b865e1) +* up themes (7d9ff9bf) +* 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) +* up themes (5c14438d) +* up themes (cb3252be) +* up harmony (c7df93b4) +* 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) +* **deps:** + * update coverallsapp/github-action action to v2.2.2 (#11977) (15c6fd6b) + * update dependency jquery to v3.7.1 (#11963) (94f07c14) + * update dependency eslint to v8.48.0 (#11953) (4d0055f0) + * update dependency lint-staged to v14.0.1 (#11936) (1e0661dc) + * update dependency eslint-plugin-import to v2.28.1 (#11848) (44a9d88a) + * update redis docker tag to v7.2.0 (#11924) (c41a4a0f) + * update dependency sass-embedded to v1.66.1 (#11926) (64925578) + * update mongo docker tag to v7 (#11928) (7ebdfe71) +* **i18n:** + * fallback strings for new resources: nodebb.admin-settings-reputation, nodebb.error (271cf81e) + * fallback strings for new resources: nodebb.notifications (69f86747) + * fallback strings for new resources: nodebb.email, nodebb.modules, nodebb.notifications (6a1b1141) + +##### New Features + +* typing user list in chat (60035744) +* add data-allow-dupe and data-navigator-ignore (92f5c146) +* add a filter hook to login (a3d6dba6) +* use all events in addTopicEvents (4bc21a2e) +* add socket.data.uid on connect (f026e740) +* #11949, show alert if posts is going to be queued (731466e5) +* #6021 add min:rep-post-links (#11938) (979f24b1) +* add new notif type for public rooms (b65d8e82) +* better acp sidebar in dark mode (c92ecfb4) +* check mute when messaging, closes #11932 (9534f9b9) +* log roomId/roomName on delete (b958a39a) + +##### Bug Fixes + +* **deps:** + * update dependency nodemailer to v6.9.5 (#11980) (d2636989) + * update dependency archiver to v6.0.1 (#11976) (0e885a20) + * update dependency nodebb-theme-harmony to v1.1.50 (#11975) (b46425b1) + * update dependency spdx-license-list to v6.7.0 (#11974) (9138702d) + * update dependency postcss to v8.4.29 (#11968) (286dcf9a) + * update dependency jsonwebtoken to v9.0.2 (#11972) (4251394f) + * update dependency cron to v2.4.3 (#11957) (b25793cd) + * update dependency nodebb-theme-peace to v2.1.16 (#11958) (44611e05) + * update dependency cropperjs to v1.6.0 (#11956) (521a13f4) + * update dependency nodebb-plugin-composer-default to v10.2.17 (#11951) (d20c9cf2) + * update dependency nodebb-theme-harmony to v1.1.43 (#11950) (d28b1f4b) + * update dependency mongodb to v5.8.1 (#11948) (551e4043) + * bump markdown (f9b8a079) + * bump ntfy (79703919) + * update dependency nodebb-plugin-markdown to v12.2.1 (#11939) (a04d3972) + * update dependency mongodb to v5.8.0 (#11940) (76a4fee9) + * update dependency pg to v8.11.3 (#11919) (9c837632) + * update dependency archiver to v6 (#11929) (0b1b6af3) + * update dependency sass to v1.66.1 (#11927) (01c94daf) + * update dependency pg-cursor to v2.10.3 (#11920) (c09c29fa) +* don't create tooltips on mobile (ded596fe) +* always return string from helper (bdeca049) +* double escape issue, body is escaped in composer-default (6ae0d207) +* make selector stricter (9f7a39c5) +* #11969, match the server side behaviour for filters (887dfd7d) +* remove og:image value (#11966) (90ac82d0) +* don't try to parse response if request is head #11960 (440299e6) +* pinned msgs when switching chats (acee6777) +* deleted chat messages (#11962) (1a1fd64d) +* closes #11954, fix custom skins with spaces (965780b7) +* dont show chat notif if you are already in the room (3d6668e7) +* #11947, make user message has a numeric timestamp (dc0fb81b) +* #11944, dont refresh page when uninstalling (f5baca14) +* closes #11921 (e3969706) +* bookmark scroll doing ajaxify (2e0964e6) +* closes #11937, add dropup early based on position on screen (a7a266d7) +* improper SSO format (regression), update openapi schema (4a846803) +* return empty array for 'sso' otherwise (db15e7c4) +* #11906, remove retrieval of SSO data in getAllData internal method, only retrieve for calling user or admins, and only on edit page (a6c98de6) +* language string (4e0c6329) +* admins should see public chats (aeb27f4b) +* show access denied instead of internal error (7dd143e1) + +##### Other Changes + +* remove unused translator (34242e7a) +* fix spec (c0eefe72) + +##### Refactors + +* use map/get (98c3d2e9) +* add targetUid to email-change event (4e5340d2) +* how admins change emails (#11973) (8db13d8e) + +##### Tests + +* one more fix (8b533d54) +* fix tests, dont hang if payload is string (6b09b7c7) +* fix redirect test (35e689cf) + #### v3.3.9 (2023-08-25) ##### Chores From 19b7cdb245524f5c4d0a789e4b2013560a9bae70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 6 Sep 2023 11:00:34 -0400 Subject: [PATCH 3/4] fix: #11981, post immediately when canceling scheduling --- src/posts/edit.js | 2 +- src/topics/scheduled.js | 46 ++++++++++++++++++++++++----------------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/posts/edit.js b/src/posts/edit.js index c75f7f2379..fed05baa63 100644 --- a/src/posts/edit.js +++ b/src/posts/edit.js @@ -186,7 +186,7 @@ module.exports = function (Posts) { throw new Error('[[error:no-privileges]]'); } const isMain = parseInt(data.pid, 10) === parseInt(topicData.mainPid, 10); - if (isMain && (isNaN(data.timestamp) || data.timestamp < Date.now())) { + if (isMain && isNaN(data.timestamp)) { throw new Error('[[error:invalid-data]]'); } } diff --git a/src/topics/scheduled.js b/src/topics/scheduled.js index bd79e1b07c..52d70366dc 100644 --- a/src/topics/scheduled.js +++ b/src/topics/scheduled.js @@ -26,6 +26,11 @@ Scheduled.handleExpired = async function () { return; } + await postTids(tids); + await db.sortedSetsRemoveRangeByScore([`topics:scheduled`], '-inf', now); +}; + +async function postTids(tids) { let topicsData = await topics.getTopicsData(tids); // Filter deleted topicsData = topicsData.filter(topicData => Boolean(topicData)); @@ -43,9 +48,8 @@ Scheduled.handleExpired = async function () { updateUserLastposttimes(uids, topicsData), updateGroupPosts(uids, topicsData), ...topicsData.map(topicData => unpin(topicData.tid, topicData)), - db.sortedSetsRemoveRangeByScore([`topics:scheduled`], '-inf', now) )); -}; +} // topics/tools.js#pin/unpin would block non-admins/mods, thus the local versions Scheduled.pin = async function (tid, topicData) { @@ -62,23 +66,27 @@ Scheduled.pin = async function (tid, topicData) { }; Scheduled.reschedule = async function ({ cid, tid, timestamp, uid }) { - const mainPid = await topics.getTopicField(tid, 'mainPid'); - await Promise.all([ - db.sortedSetsAdd([ - 'topics:scheduled', - `uid:${uid}:topics`, - 'topics:tid', - `cid:${cid}:uid:${uid}:tids`, - ], timestamp, tid), - posts.setPostField(mainPid, 'timestamp', timestamp), - db.sortedSetsAdd([ - 'posts:pid', - `uid:${uid}:posts`, - `cid:${cid}:uid:${uid}:pids`, - ], timestamp, mainPid), - shiftPostTimes(tid, timestamp), - ]); - return topics.updateLastPostTimeFromLastPid(tid); + if (timestamp < Date.now()) { + await postTids([tid]); + } else { + const mainPid = await topics.getTopicField(tid, 'mainPid'); + await Promise.all([ + db.sortedSetsAdd([ + 'topics:scheduled', + `uid:${uid}:topics`, + 'topics:tid', + `cid:${cid}:uid:${uid}:tids`, + ], timestamp, tid), + posts.setPostField(mainPid, 'timestamp', timestamp), + db.sortedSetsAdd([ + 'posts:pid', + `uid:${uid}:posts`, + `cid:${cid}:uid:${uid}:pids`, + ], timestamp, mainPid), + shiftPostTimes(tid, timestamp), + ]); + await topics.updateLastPostTimeFromLastPid(tid); + } }; function unpin(tid, topicData) { From 8357bb2e0af22bf2b5e7f236540d444c3b29029c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 6 Sep 2023 11:33:53 -0400 Subject: [PATCH 4/4] chore: up dbsearch --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 141a2dea79..8d712e4b65 100644 --- a/install/package.json +++ b/install/package.json @@ -94,7 +94,7 @@ "nconf": "0.12.0", "nodebb-plugin-2factor": "7.2.1", "nodebb-plugin-composer-default": "10.2.18", - "nodebb-plugin-dbsearch": "6.2.1", + "nodebb-plugin-dbsearch": "6.2.2", "nodebb-plugin-emoji": "5.1.5", "nodebb-plugin-emoji-android": "4.0.0", "nodebb-plugin-markdown": "12.2.3",