Move push notification setup to NeoChatConnection

This commit is contained in:
Joshua Goins
2023-11-10 08:46:52 -05:00
parent 99f6778df4
commit 3fc125a798
4 changed files with 63 additions and 54 deletions

View File

@@ -6,6 +6,7 @@
#include <QObject>
#include <QQmlEngine>
#include <QCoro/Task>
#include <Quotient/connection.h>
class NeoChatConnection : public Quotient::Connection
@@ -75,6 +76,10 @@ public:
*/
Q_INVOKABLE void openOrCreateDirectChat(Quotient::User *user);
// note: this is intentionally a copied QString because
// the reference could be destroyed before the task is finished
QCoro::Task<void> setupPushNotifications(QString endpoint);
QString deviceKey() const;
QString encryptionKey() const;