diff --git a/CHANGELOG.md b/CHANGELOG.md index 425918b2..80e840d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,9 @@ Format follows [Keep a Changelog](https://keepachangelog.com/). Haven uses [Sema - **Link cards in threads (#5620).** A link posted as a reply in a forum topic, or in any other thread, now gets the same preview card as it does in the channel. Reported by @quakeman00. +- **Forum topic cards show the protection shield (#5622).** A protected topic + now carries the shield on its card, and its right-click menu offers Unprotect + instead of Protect a second time. Reported by @quakeman00. ## [4.6.0] - 2026-09-09 diff --git a/public/js/app.js b/public/js/app.js index 752f0210..2ea9ffba 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -4,7 +4,7 @@ // notifications, volume sliders, status bar // ═══════════════════════════════════════════════════════════ -import SocketMethods from './modules/app-socket.js?v=4.5.5'; +import SocketMethods from './modules/app-socket.js?v=4.6.1'; import UIBindMethods from './modules/app-ui.js?v=4.6.1'; import MediaMethods from './modules/app-media.js?v=4.5.4'; import ContextMethods from './modules/app-context.js?v=3.44.6'; @@ -17,7 +17,7 @@ import AdminMethods from './modules/app-admin.js?v=4.6.1'; import PlatformMethods from './modules/app-platform.js?v=4.5.1'; import SearchMethods from './modules/app-search.js?v=3.49.0'; import FerryMethods from './modules/app-ferry.js?v=3.51.4'; -import ForumMethods from './modules/app-forum.js?v=4.5.0'; +import ForumMethods from './modules/app-forum.js?v=4.6.1'; class HavenApp { constructor() { diff --git a/public/js/modules/app-forum.js b/public/js/modules/app-forum.js index 3a29c29b..427e25b9 100644 --- a/public/js/modules/app-forum.js +++ b/public/js/modules/app-forum.js @@ -182,6 +182,9 @@ _createForumTopicEl(msg) { el.dataset.userId = msg.user_id; el.dataset.time = msg.created_at; el.dataset.username = msg.username || ''; + // Protected topics carry the same flag and shield as a message in chat, so + // the card shows it and the context menu offers Unprotect (#5622). + if (msg.is_archived) { el.classList.add('archived'); el.dataset.archived = '1'; } const tagsOf = this._forumTagsOf(); const tags = Array.isArray(msg.tags) ? msg.tags : []; const thumb = this._forumThumbOf(msg); @@ -191,7 +194,7 @@ _createForumTopicEl(msg) { el.innerHTML = ` ${thumb ? `