Page MenuHomePhorge

D13.1732327884.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D13.1732327884.diff

diff --git a/src/contents/ui/event-types/TextTemplate.qml b/src/contents/ui/event-types/TextTemplate.qml
--- a/src/contents/ui/event-types/TextTemplate.qml
+++ b/src/contents/ui/event-types/TextTemplate.qml
@@ -56,11 +56,9 @@
</style>
`;
const formattedBody = event.content.formatted_body;
- if (event.replyingToEventId) {
- if (formattedBody.startsWith('<mx-reply>')) {
- const index = formattedBody.indexOf('</mx-reply>');
- return stylesheet + formattedBody.slice(index + '</mx-reply>'.length);
- }
+ if (event.replyingToEventId && formattedBody.startsWith('<mx-reply>')) {
+ const index = formattedBody.indexOf('</mx-reply>');
+ return stylesheet + formattedBody.slice(index + '</mx-reply>'.length);
} else {
return stylesheet + formattedBody;
}
diff --git a/src/tests/quick-tests/tst_EventView.qml b/src/tests/quick-tests/tst_EventView.qml
--- a/src/tests/quick-tests/tst_EventView.qml
+++ b/src/tests/quick-tests/tst_EventView.qml
@@ -90,6 +90,7 @@
sender: '',
type: 'm.room.message',
stateKey: '',
+ replyingToEventId: '$xxx',
content: {
msgtype: 'm.text',
body: '> some quote\n**some body**',
@@ -104,6 +105,7 @@
sender: '',
type: 'm.room.message',
stateKey: '',
+ replyingToEventId: '$xxx',
content: {
msgtype: 'm.text',
body: '**some body**',

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 6:11 PM (41 m, 31 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38966
Default Alt Text
D13.1732327884.diff (1 KB)

Event Timeline