fixc
This commit is contained in:
@@ -128,8 +128,9 @@ function addMessage({
|
||||
/**
|
||||
* Insert a system notice as a root‐level thread item.
|
||||
* @param {string} content — HTML or plain text for the notice
|
||||
* @param {boolean} [shouldNotify=true] — whether to trigger a browser notification
|
||||
*/
|
||||
function addNotice(content) {
|
||||
function addNotice(content, shouldNotify = true) {
|
||||
const ts = Math.floor(Date.now() / 1000);
|
||||
const id = String(noticeCounter--);
|
||||
threads.set(id, {
|
||||
@@ -141,7 +142,7 @@ function addNotice(content) {
|
||||
children: [],
|
||||
});
|
||||
rootIds.push(id);
|
||||
notifyNotice(content);
|
||||
if (shouldNotify) notifyNotice(content);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user