mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix verification start to start with request
This commit is contained in:
parent
94690ebd4c
commit
54e3c2c96b
4 changed files with 5 additions and 7 deletions
|
@ -6,7 +6,6 @@ import im.nheko 1.0
|
|||
|
||||
ApplicationWindow {
|
||||
property var flow
|
||||
property bool isRequest
|
||||
property var tran_id
|
||||
|
||||
title: stack.currentItem.title
|
||||
|
|
|
@ -64,7 +64,7 @@ Pane {
|
|||
}
|
||||
onClicked: {
|
||||
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;
|
||||
|
||||
req.from_device = http::client()->device_id();
|
||||
req.methods.resize(1);
|
||||
req.methods[0] = mtx::events::msg::VerificationMethods::SASv1;
|
||||
req.methods = {mtx::events::msg::VerificationMethods::SASv1};
|
||||
|
||||
if (this->type == DeviceVerificationFlow::Type::ToDevice) {
|
||||
QDateTime CurrentTime = QDateTime::currentDateTimeUtc();
|
||||
QDateTime currentTime = QDateTime::currentDateTimeUtc();
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ private:
|
|||
// general
|
||||
QString userId;
|
||||
QString deviceId;
|
||||
Method method;
|
||||
Method method = Method::Emoji;
|
||||
Type type;
|
||||
bool sender;
|
||||
QTimer *timeout = nullptr;
|
||||
|
|
Loading…
Reference in a new issue