mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
Merge pull request #1176 from PR0M3TH3AN/codex/add-access-control-blacklist-change-handler
Refresh guest feeds on admin blacklist changes
This commit is contained in:
1 file changed
+25
@@ -513,6 +513,31 @@ class Application {
|
||||
if (typeof accessControl.onBlacklistChange === "function") {
|
||||
accessControl.onBlacklistChange(() => {
|
||||
syncSessionActorBlacklist("blacklist-change");
|
||||
if (this.isUserLoggedIn()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const refreshReason = "admin-blacklist-change";
|
||||
this.refreshAllVideoGrids({
|
||||
reason: refreshReason,
|
||||
forceMainReload: true,
|
||||
}).catch((error) => {
|
||||
devLogger.warn(
|
||||
"[app.init()] Failed to refresh video grids after admin blacklist change:",
|
||||
error,
|
||||
);
|
||||
});
|
||||
|
||||
if (typeof this.refreshVisibleModerationUi === "function") {
|
||||
try {
|
||||
this.refreshVisibleModerationUi({ reason: refreshReason });
|
||||
} catch (error) {
|
||||
devLogger.warn(
|
||||
"[app.init()] Failed to refresh moderation UI after admin blacklist change:",
|
||||
error,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user