mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Add check for body
This commit is contained in:
parent
3d1a0ccf12
commit
c0282e0351
1 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,9 @@ function getHtmlReplyFallback(mxEvent: MatrixEvent): string {
|
|||
|
||||
function getTextReplyFallback(mxEvent: MatrixEvent): string {
|
||||
const body = mxEvent.getContent().body;
|
||||
if (!body) {
|
||||
return "";
|
||||
}
|
||||
const lines = body.split("\n").map(l => l.trim());
|
||||
if (lines.length > 2 && lines[0].startsWith("> ") && lines[1].length === 0) {
|
||||
return `${lines[0]}\n\n`;
|
||||
|
|
Loading…
Reference in a new issue