fix(notifications): keep dismissal helpers self-contained
This commit is contained in:
1 parent
b3d66dd40d
commit
056b3c268f
1 file changed
+3
-1
+3
-1
@@ -7445,7 +7445,9 @@ function _isApprovalDismissed(sid, approvalId) {
|
||||
if (!key) return false;
|
||||
const dismissed = _getDismissedApprovals();
|
||||
if (dismissed.includes(key)) return true;
|
||||
const legacyKey = _legacyApprovalDismissKey(sid, approvalId);
|
||||
const pending = typeof approvalId === "object" ? approvalId : {approval_id: approvalId};
|
||||
const legacyId = pending && pending.approval_id;
|
||||
const legacyKey = sid && legacyId ? String(sid) + "\0" + String(legacyId) : "";
|
||||
if (!legacyKey || !dismissed.includes(legacyKey)) return false;
|
||||
// Bind an old session/ID tombstone to the currently observed full owner.
|
||||
// This keeps an unresolved dismissal quiet through upgrade without letting
|
||||
|
||||
Reference in new issue
Block a user