From 813643adbf3d1eb943f88cbb5fff36120d9d9a02 Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Sun, 6 Mar 2022 06:49:14 -0800 Subject: [PATCH] fix(chat): Stop spellcheck from leaking messages to logs --- src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 229af9977..0e19fc702 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -92,8 +92,13 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QSt { // Silence qWarning spam due to bug in QTextBrowser (trying to open a file for base64 images) if (ctxt.function == QString("virtual bool QFSFileEngine::open(QIODevice::OpenMode)") - && msg == QString("QFSFileEngine::open: No file name specified")) + && msg == QString("QFSFileEngine::open: No file name specified")) { return; + } + if (msg.startsWith("Unable to find any suggestion for")) { + // Prevent sonnet's complaints from leaking user chat messages to logs + return; + } if (msg == QString("attempted to send message with network family 10 (probably IPv6) on IPv4 socket")) { // non-stop c-toxcore spam for IPv4 users: https://github.com/TokTok/c-toxcore/issues/1432