Skip to content

Commit

Permalink
Add Android TTL setting
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti committed Jan 3, 2025
1 parent 3494b01 commit 7a9d873
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/firebaseadminmessaging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ void FirebaseAndroidNotification::setColor(const QString &color)
m_notification[u"color"] = color;
}

void FirebaseAndroidNotification::setTtl(std::chrono::seconds ttl)
{
m_notification[u"ttl"] = QString{QString::number(ttl.count()) + u's'};
}

void FirebaseAndroidNotification::setData(const QMap<QString, QString> &data)
{
QJsonObject obj;
Expand Down
1 change: 1 addition & 0 deletions src/firebaseadminmessaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class FIREBASE_ADMIN_QT_EXPORT FirebaseAndroidNotification
void setIcon(const QString &icon);
void setTag(const QString &tag);
void setColor(const QString &color);
void setTtl(std::chrono::seconds ttl);
void setData(const QMap<QString, QString> &data);

bool isNull() const;
Expand Down

0 comments on commit 7a9d873

Please sign in to comment.