From 63d1af02253960fc31377199f685b37317e367ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= Date: Mon, 1 Apr 2019 00:19:31 +0200 Subject: [PATCH] Don't fetch details about closed MPIM groups --- src/slackclient.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slackclient.cpp b/src/slackclient.cpp index efede1d..760cba5 100644 --- a/src/slackclient.cpp +++ b/src/slackclient.cpp @@ -653,6 +653,12 @@ void SlackClient::loadConversations(QString cursor) { foreach (const QJsonValue &value, data.value("channels").toArray()) { QJsonObject channel = value.toObject(); + // Skip private group chats that are closed, we don't want those listed or + // counted towards our unread count. If we receive a message in those + if (channel.value("is_mpim").toBool() && !channel.value("is_open").toBool()) { + continue; + } + QString infoMethod; if (channel.value("is_channel").toBool()) { infoMethod = "channels.info";