Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33030792
D8683.1768401546.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
802 B
Referenced Files
None
Subscribers
None
D8683.1768401546.diff
View Options
diff --git a/keyserver/src/updaters/thread-updaters.js b/keyserver/src/updaters/thread-updaters.js
--- a/keyserver/src/updaters/thread-updaters.js
+++ b/keyserver/src/updaters/thread-updaters.js
@@ -861,6 +861,21 @@
const pinnedValue = action === 'pin' ? 1 : 0;
const pinTimeValue = action === 'pin' ? Date.now() : null;
+ const messagePinStatusQuery = SQL`
+ SELECT pinned
+ FROM messages
+ WHERE id = ${messageID}
+ AND thread = ${threadID}
+ `;
+ const [[pinnedResult]] = await dbQuery(messagePinStatusQuery);
+ const { pinned: currentPinnedValue } = pinnedResult;
+ if (currentPinnedValue === pinnedValue) {
+ return {
+ newMessageInfos: [],
+ threadID,
+ };
+ }
+
const togglePinQuery = SQL`
UPDATE messages
SET pinned = ${pinnedValue},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 2:39 PM (7 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5932488
Default Alt Text
D8683.1768401546.diff (802 B)
Attached To
Mode
D8683: [keyserver] Fix the pinned count MariaDB out of range issue
Attached
Detach File
Event Timeline
Log In to Comment