Page MenuHomePhorge

D13.1732489598.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D13.1732489598.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
Sun, Nov 24, 3:06 PM (8 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39817
Default Alt Text
D13.1732489598.diff (1 KB)

Event Timeline