mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 11:22:25 +00:00
fix(core): optimize moderation subscriptions and reduce log noise (agent)
- Refactor `ModerationService` to use batched subscriptions for trusted mute lists, reducing relay load. - Fix `WebTorrent` memory leak by setting `setMaxListeners(0)` on client instances. - Suppress "Failed to connect to relay" warnings in `countDiagnostics.js`. - Degrade benign DM sync errors (e.g. "no-decryptors") to info/debug logs in `profileModalController.js`. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
b38517b4f2
commit
fd4318c2f9
4 files changed
+129
-149
No files matched your search
@@ -5044,10 +5044,22 @@ export class ProfileModalController {
|
||||
|
||||
handleDirectMessagesError(detail = {}) {
|
||||
const error = detail?.error || detail?.failure || detail;
|
||||
userLogger.warn(
|
||||
"[profileModal] Direct message sync issue detected:",
|
||||
error,
|
||||
);
|
||||
const reason = detail?.context?.reason || "";
|
||||
const errorCode = error?.code || "";
|
||||
|
||||
const isBenign =
|
||||
reason === "no-decryptors" ||
|
||||
errorCode === "decryption-failed" ||
|
||||
(typeof error === "string" && error.includes("no-decryptors"));
|
||||
|
||||
if (isBenign) {
|
||||
devLogger.info("[profileModal] Direct message sync info:", error);
|
||||
} else {
|
||||
userLogger.warn(
|
||||
"[profileModal] Direct message sync issue detected:",
|
||||
error,
|
||||
);
|
||||
}
|
||||
|
||||
if (this.activeMessagesRequest) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user