Fix verification start to start with request
This commit is contained in:
parent
94690ebd4c
commit
54e3c2c96b
@ -6,7 +6,6 @@ import im.nheko 1.0
|
|||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
property var flow
|
property var flow
|
||||||
property bool isRequest
|
|
||||||
property var tran_id
|
property var tran_id
|
||||||
|
|
||||||
title: stack.currentItem.title
|
title: stack.currentItem.title
|
||||||
|
@ -64,7 +64,7 @@ Pane {
|
|||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
stack.replace(awaitingVerificationRequestAccept);
|
stack.replace(awaitingVerificationRequestAccept);
|
||||||
isRequest?flow.sendVerificationRequest():flow.startVerificationRequest(); }
|
flow.sender ?flow.sendVerificationRequest():flow.startVerificationRequest(); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -498,14 +498,13 @@ DeviceVerificationFlow::sendVerificationRequest()
|
|||||||
mtx::events::msg::KeyVerificationRequest req;
|
mtx::events::msg::KeyVerificationRequest req;
|
||||||
|
|
||||||
req.from_device = http::client()->device_id();
|
req.from_device = http::client()->device_id();
|
||||||
req.methods.resize(1);
|
req.methods = {mtx::events::msg::VerificationMethods::SASv1};
|
||||||
req.methods[0] = mtx::events::msg::VerificationMethods::SASv1;
|
|
||||||
|
|
||||||
if (this->type == DeviceVerificationFlow::Type::ToDevice) {
|
if (this->type == DeviceVerificationFlow::Type::ToDevice) {
|
||||||
QDateTime CurrentTime = QDateTime::currentDateTimeUtc();
|
QDateTime currentTime = QDateTime::currentDateTimeUtc();
|
||||||
|
|
||||||
req.transaction_id = this->transaction_id;
|
req.transaction_id = this->transaction_id;
|
||||||
req.timestamp = (uint64_t)CurrentTime.toTime_t();
|
req.timestamp = (uint64_t)currentTime.toMSecsSinceEpoch();
|
||||||
|
|
||||||
mtx::requests::ToDeviceMessages<mtx::events::msg::KeyVerificationRequest> body;
|
mtx::requests::ToDeviceMessages<mtx::events::msg::KeyVerificationRequest> body;
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ private:
|
|||||||
// general
|
// general
|
||||||
QString userId;
|
QString userId;
|
||||||
QString deviceId;
|
QString deviceId;
|
||||||
Method method;
|
Method method = Method::Emoji;
|
||||||
Type type;
|
Type type;
|
||||||
bool sender;
|
bool sender;
|
||||||
QTimer *timeout = nullptr;
|
QTimer *timeout = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user