diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-10-05 22:12:10 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-10-05 22:12:10 +0200 |
commit | bca29a4227a871caac21236c29430b69264018ce (patch) | |
tree | dc5bf6b5ecc0ceed9d31d1210fc45693ad295b14 /src/timeline/TimelineViewManager.h | |
parent | Don't fail on missing key for a device and /rotate-megolm-session command (diff) | |
download | nheko-bca29a4227a871caac21236c29430b69264018ce.tar.xz |
Make steps in verification flow explicit
Diffstat (limited to 'src/timeline/TimelineViewManager.h')
-rw-r--r-- | src/timeline/TimelineViewManager.h | 25 |
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) |