Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Commit

Permalink
And fixing a small regression xD
Browse files Browse the repository at this point in the history
  • Loading branch information
Flohack74 committed Mar 10, 2018
1 parent b5ec5f5 commit b47cb63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions telegram/push/pushhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ QJsonObject PushHelper::pushToPostalMessage(const QJsonObject &push, QString &ta
key = message["loc_key"].toString(); // no-i18n
}

//Early bail-out: Telegram server just removes notification, message has been read elsewhere
if (key == "")
return QJsonObject();

QJsonArray args;
if (message.keys().contains("loc_args")) {
args = message["loc_args"].toArray(); // no-i18n
Expand All @@ -104,6 +100,10 @@ QJsonObject PushHelper::pushToPostalMessage(const QJsonObject &push, QString &ta
tag = custom["channel_id"].toString();
}

//Early bail-out: Telegram server just removes notification, message has been read elsewhere
if (key == "")
return QJsonObject();

qint64 chatId = tag.toInt();

// TRANSLATORS: Application name.
Expand Down

0 comments on commit b47cb63

Please sign in to comment.