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 <noreply@anthropic.com>
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user