summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/TimelineView.qml15
-rw-r--r--resources/qml/device-verification/DeviceVerification.qml7
2 files changed, 17 insertions, 5 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 699efc54..c6fc3851 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -106,13 +106,20 @@ Page {
 		}
 		Connections {
 			target: TimelineManager
-			function onNewDeviceVerificationRequest(flow,transactionId,userId,deviceId) {
+			function onNewDeviceVerificationRequest(flow,transactionId,userId,deviceId,isRequest) {
 				flow.userId = userId;
 				flow.sender = false;
 				flow.deviceId = deviceId;
-				flow.tranId = transactionId;
-				deviceVerificationList.add(flow.tranId);
-				var dialog = deviceVerificationDialog.createObject(timelineRoot, {flow: flow});
+				switch(flow.type){
+					case DeviceVerificationFlow.ToDevice:
+					    flow.tranId = transactionId;
+						deviceVerificationList.add(flow.tranId);
+						break;
+					case DeviceVerificationFlow.RoomMsg:
+						deviceVerificationList.add(flow.tranId);
+						break;
+				}
+				var dialog = deviceVerificationDialog.createObject(timelineRoot, {flow: flow,isRequest = isRequest});
 				dialog.show();
 			}
 		}
diff --git a/resources/qml/device-verification/DeviceVerification.qml b/resources/qml/device-verification/DeviceVerification.qml
index 4d734a68..8e74d1cb 100644
--- a/resources/qml/device-verification/DeviceVerification.qml
+++ b/resources/qml/device-verification/DeviceVerification.qml
@@ -23,6 +23,8 @@ ApplicationWindow {
 	}
 
 	property var flow
+	property bool isRequest
+
 	Connections {
 		target: flow
 		onVerificationCanceled: stack.replace(partnerAborted)
@@ -155,7 +157,10 @@ ApplicationWindow {
                             horizontalAlignment: Text.AlignHCenter
                             verticalAlignment: Text.AlignVCenter
                         }
-						onClicked: { stack.replace(awaitingVerificationRequestAccept); flow.acceptVerificationRequest(); }
+						onClicked: { 
+							stack.replace(awaitingVerificationRequestAccept); 
+							isRequest?flow.sendVerificationReady():flow.acceptVerificationRequest(); 
+						}
 					}
 				}
 			}