Detect channel properly for notifications

This commit is contained in:
Sebastian J. Wolf 2020-09-15 21:37:24 +02:00
parent f9c027981d
commit db831f5a0a

View file

@ -167,7 +167,7 @@ QVariantMap NotificationManager::sendNotification(const QString &chatId, const Q
QVariantMap chatInformation = this->chatMap.value(chatId).toMap();
QString chatType = chatInformation.value("type").toMap().value("@type").toString();
bool addAuthor = false;
if (chatType == "chatTypeBasicGroup" || ( chatType == "chatTypeSupergroup" && !chatInformation.value("type").toMap().value("@is_channel").toBool() )) {
if (chatType == "chatTypeBasicGroup" || ( chatType == "chatTypeSupergroup" && !chatInformation.value("@type").toMap().value("is_channel").toBool() )) {
addAuthor = true;
}