Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F114778
D174.1732576363.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D174.1732576363.diff
View Options
diff --git a/src/contents/ui/EventSourceView.qml b/src/contents/ui/EventSourceView.qml
--- a/src/contents/ui/EventSourceView.qml
+++ b/src/contents/ui/EventSourceView.qml
@@ -13,7 +13,7 @@
Label {
text: l10n.get('event-source-decrypted')
- visible: event.decrypted
+ visible: event.encrypted
}
TextArea {
@@ -21,7 +21,7 @@
text: stringify(event.decryptedSource)
readOnly: true
font.family: 'monospace'
- visible: event.decrypted
+ visible: event.encrypted
Layout.fillWidth: true
wrapMode: TextEdit.Wrap
}
diff --git a/src/matrix-event.cpp b/src/matrix-event.cpp
--- a/src/matrix-event.cpp
+++ b/src/matrix-event.cpp
@@ -112,7 +112,7 @@
return e.originalJson().get().template get<QJsonObject>();
}))
, LAGER_QT(decryptedSource)(m_event.map([](Event e) {
- return e.decrypted() ? e.raw().get().template get<QJsonObject>() : QJsonObject();
+ return e.encrypted() ? e.decryptedJson().get().template get<QJsonObject>() : QJsonObject();
}))
, LAGER_QT(replyingToEventId)(m_event.map([](Event e) {
return e.replyingTo();
diff --git a/src/tests/quick-tests/tst_EventSourceView.qml b/src/tests/quick-tests/tst_EventSourceView.qml
--- a/src/tests/quick-tests/tst_EventSourceView.qml
+++ b/src/tests/quick-tests/tst_EventSourceView.qml
@@ -78,7 +78,7 @@
}
function test_encrypted() {
- verify(!findChild(evEncrypted, 'decryptedSourceView').visible);
+ verify(findChild(evEncrypted, 'decryptedSourceView').visible);
verify(findChild(evEncrypted, 'originalSourceView').visible);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 3:12 PM (10 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39911
Default Alt Text
D174.1732576363.diff (1 KB)
Attached To
Mode
D174: Show decrypted json source for undecrypted events
Attached
Detach File
Event Timeline
Log In to Comment