From 264a8493fb6dfbba94f1182195b5fda79d52196f Mon Sep 17 00:00:00 2001 From: dealerweb Date: Wed, 5 Aug 2026 14:39:48 +0200 Subject: [PATCH] fix: route the calendar parse dump through the debug logger Opening a message with a calendar invitation printed the whole parsed event to the console on every render - title, description, attendees and location included - through a leftover `[PARSE DEBUG]` console.log. The surrounding file already logs via debug.log('calendar', ...) in 22 places, which honours the debugMode setting and its category filters, so this one line was the outlier. It also ran JSON.stringify with indentation unconditionally, even though nothing was listening. Passing the object to debug.log instead leaves the formatting to the logger, so nothing is serialised unless the calendar debug category is actually switched on. --- lib/jmap/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jmap/client.ts b/lib/jmap/client.ts index 63e368fa5..a03214dda 100644 --- a/lib/jmap/client.ts +++ b/lib/jmap/client.ts @@ -5263,7 +5263,7 @@ export class JMAPClient implements IJMAPClient { if (response.methodResponses?.[0]?.[0] === "CalendarEvent/parse") { const result = response.methodResponses[0][1]; - console.log('[PARSE DEBUG] CalendarEvent/parse raw result:', JSON.stringify(result, null, 2)); + debug.log('calendar', '[CalendarEvent/parse] raw result:', result); if (result.notParsable && result.notParsable.includes(blobId)) { throw new Error("Invalid calendar file format");