summary refs log tree commit diff
path: root/src/timeline/TimelineViewManager.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-10-05 22:12:10 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-10-05 22:12:10 +0200
commitbca29a4227a871caac21236c29430b69264018ce (patch)
treedc5bf6b5ecc0ceed9d31d1210fc45693ad295b14 /src/timeline/TimelineViewManager.h
parentDon't fail on missing key for a device and /rotate-megolm-session command (diff)
downloadnheko-bca29a4227a871caac21236c29430b69264018ce.tar.xz
Make steps in verification flow explicit
Diffstat (limited to 'src/timeline/TimelineViewManager.h')
-rw-r--r--src/timeline/TimelineViewManager.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h
index 4779d3cd..12e49080 100644
--- a/src/timeline/TimelineViewManager.h
+++ b/src/timeline/TimelineViewManager.h
@@ -24,20 +24,6 @@ class ColorImageProvider;
 class UserSettings;
 class ChatPage;
 
-class DeviceVerificationList : public QObject
-{
-        Q_OBJECT
-public:
-        Q_INVOKABLE void add(QString tran_id);
-        Q_INVOKABLE void remove(QString tran_id);
-        Q_INVOKABLE bool exist(QString tran_id);
-signals:
-        void updateProfile(QString userId);
-
-private:
-        QVector<QString> deviceVerificationList;
-};
-
 class TimelineViewManager : public QObject
 {
         Q_OBJECT
@@ -77,6 +63,9 @@ public:
         Q_INVOKABLE void openLeaveRoomDialog() const;
         Q_INVOKABLE void openRoomSettings() const;
 
+        void verifyUser(QString userid);
+        void verifyDevice(QString userid, QString deviceid);
+
 signals:
         void clearRoomMessageCount(QString roomid);
         void updateRoomsLastMessage(QString roomid, const DescInfo &info);
@@ -84,11 +73,7 @@ signals:
         void initialSyncChanged(bool isInitialSync);
         void replyingEventChanged(QString replyingEvent);
         void replyClosed();
-        void newDeviceVerificationRequest(DeviceVerificationFlow *flow,
-                                          QString transactionId,
-                                          QString userId,
-                                          QString deviceId,
-                                          bool isRequest = false);
+        void newDeviceVerificationRequest(DeviceVerificationFlow *flow);
         void inviteUsers(QStringList users);
         void showRoomList();
         void narrowViewChanged();
@@ -180,7 +165,7 @@ private:
         QSharedPointer<UserSettings> settings;
         QHash<QString, QColor> userColors;
 
-        DeviceVerificationList *dvList;
+        QHash<QString, QSharedPointer<DeviceVerificationFlow>> dvList;
 };
 Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationAccept)
 Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationCancel)