Skip to content

Commit

Permalink
Don't fetch details about closed MPIM groups
Browse files Browse the repository at this point in the history
  • Loading branch information
danvratil committed Mar 31, 2019
1 parent 183a52c commit 63d1af0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/slackclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 63d1af0

Please sign in to comment.