これに対する設定ソリューションはありません。ただし、JavaScript を使用すると実現できます。
テーマまたは新しいテーマコンポーネントで、JS タブに以下を追加します。
import { apiInitializer } from "discourse/lib/api";
import { schedule } from "@ember/runloop";
export default apiInitializer((api) => {
const current = api.getCurrentUser();
if (!current || !current.staff) {
return;
}
// スタッフ通知を含む最初の段落以降のすべてを削除します。
api.decorateCookedElement((element, helper) => {
const post = helper?.getModel();
if (!post || !post.notice) {
return;
}
schedule("afterRender", () => {
const postNoticeMessage = document.querySelector(
`article[data-post-id="${post.id}"] .post-notice-message`
);
if (postNoticeMessage) {
postNoticeMessage.replaceWith(postNoticeMessage.firstChild);
}
});
});
});
これで十分なはずです。
