mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 10:22:25 +00:00
Fix: Ensure trust seed mutes are loaded for session actors
- Fixed `ModerationService.reconcileTrustedMuteSubscriptions` to always force re-subscription to trusted seeds, bypassing previous state comparisons. - Enhanced `ModerationService` to filter trusted seeds against the global admin blacklist. - Added blacklist change event support to `AccessControl` and `TrustBootstrap` to dynamically update seeds when the blacklist changes. - Added detailed logging to `ModerationService`, `TrustBootstrap`, and `AccessControl` to trace trust seed initialization and application.
This commit is contained in:
1 parent
cda0671699
commit
8aaa2f69ee
2 files changed
+9
No files matched your search
@@ -243,6 +243,7 @@ class AccessControl {
|
||||
}
|
||||
|
||||
_applyState(state, options = {}) {
|
||||
userLogger.info("[accessControl] _applyState called", { state, options });
|
||||
const markLoaded = options.markLoaded !== false;
|
||||
const editors = Array.isArray(state?.editors) ? state.editors : [];
|
||||
const whitelist = Array.isArray(state?.whitelist) ? state.whitelist : [];
|
||||
@@ -421,9 +422,11 @@ class AccessControl {
|
||||
|
||||
refresh() {
|
||||
if (this._isRefreshing) {
|
||||
userLogger.info("[accessControl] refresh ignored (already refreshing)");
|
||||
return this._refreshPromise;
|
||||
}
|
||||
|
||||
userLogger.info("[accessControl] refresh started");
|
||||
const operation = this._performRefresh();
|
||||
const tracked = operation.catch((error) => {
|
||||
userLogger.error("Failed to refresh admin lists:", error);
|
||||
@@ -440,8 +443,10 @@ class AccessControl {
|
||||
|
||||
try {
|
||||
await this._refreshPromise;
|
||||
userLogger.info("[accessControl] ensureReady resolved");
|
||||
} catch (error) {
|
||||
if (!this.hasLoaded) {
|
||||
userLogger.warn("[accessControl] ensureReady retry");
|
||||
await this.refresh();
|
||||
await this._refreshPromise;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user