From 9a833a42f90d471c88e469b2821df0cdba7d5d19 Mon Sep 17 00:00:00 2001 From: Lotus Bot Date: Fri, 22 May 2026 16:33:24 -0400 Subject: [PATCH] fix: suppress matrix-js-sdk push rule warnings for unimplemented MSCs Synapse does not yet ship MSC3786/MSC3914 as server-default push rules. matrix-js-sdk patches them client-side every login and warns. Filter these at console.warn level -- functionality is unaffected. Co-Authored-By: Claude Sonnet 4.6 --- src/index.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 9f44ef704..f0e948132 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -78,6 +78,18 @@ window.addEventListener('vite:preloadError', () => { // Clear the reload flag after a successful load so future deploys can still trigger a reload window.addEventListener('load', () => sessionStorage.removeItem('chunk-reload-attempted')); + +// Synapse does not yet ship MSC3786/MSC3914 as server-default push rules. +// matrix-js-sdk patches them client-side on every login and logs a warn for each. +// Suppress the noise until Synapse implements these MSCs upstream. +{ + const _warn = console.warn.bind(console); + console.warn = (...args: unknown[]) => { + if (typeof args[0] === 'string' && args[0].startsWith('Adding default global ')) return; + _warn(...args); + }; +} + const mountApp = () => { const rootContainer = document.getElementById('root');