Strip replies when calling EventHandler::getMarkdownBody()

This matches previous behavior before
e2eb6ab33c and including the markdown
blockquote breaks edits. This also adds a test to ensure it does indeed
get stripped.
This commit is contained in:
Joshua Goins
2024-03-21 16:08:30 -04:00
committed by James Graham
parent 46a9600d55
commit 9d3c2e19f5
2 changed files with 12 additions and 1 deletions

View File

@@ -293,7 +293,10 @@ QString EventHandler::getMarkdownBody() const
}
const auto roomMessageEvent = eventCast<const RoomMessageEvent>(m_event);
return roomMessageEvent->plainBody();
QString plainBody = roomMessageEvent->plainBody();
plainBody.remove(TextRegex::removeReply);
return plainBody;
}
QString EventHandler::getBody(const Quotient::RoomEvent *event, Qt::TextFormat format, bool stripNewlines) const