mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-13 00:46:26 +00:00
only acknowledge messaged withou acked parameter
This commit is contained in:
parent
8ea70e63e8
commit
b530d7771c
@ -234,6 +234,7 @@ void PushoverFrontend::getMessages()
|
||||
app.icon(), Notification::defaultTimeout(), static_cast<Notification::Prioritys>(notification.value("priority").toInt()));
|
||||
if(n.priority() == Notification::EMERGENCY){
|
||||
n.hints().setValue("receipt", notification.value("receipt").toString());
|
||||
n.hints().setValue("acked", notification.value("acked").toString());
|
||||
}
|
||||
SnoreCore::instance().broadcastNotification(n);
|
||||
}
|
||||
@ -267,6 +268,9 @@ void PushoverFrontend::deleteMessages(int latestMessageId)
|
||||
|
||||
void PushoverFrontend::acknowledgeNotification(Notification notification)
|
||||
{
|
||||
if(notification.constHints().value("acked").toInt() == 1){
|
||||
return;
|
||||
}
|
||||
QString receipt = notification.constHints().value("receipt").toString();
|
||||
|
||||
QNetworkRequest request(QUrl(QString("https://api.pushover.net/1/receipts/%1/acknowledge.json").arg(receipt)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user