forked from mystiq/hydrogen-web
Strip reply fallback
This commit is contained in:
parent
35a13842af
commit
f6cf3b378b
1 changed files with 4 additions and 0 deletions
|
@ -346,6 +346,10 @@ class Deserializer {
|
|||
}
|
||||
|
||||
export function parseHTMLBody(platform, mediaRepository, allowReplies, html) {
|
||||
if (allowReplies) {
|
||||
// todo: might be better to remove mx-reply and children after parsing, need to think
|
||||
html = html.replace(/<mx-reply>.+<\/mx-reply>/, "");
|
||||
}
|
||||
const parseResult = platform.parseHTML(html);
|
||||
const deserializer = new Deserializer(parseResult, mediaRepository, allowReplies);
|
||||
const parts = deserializer.parseAnyNodes(parseResult.rootNodes);
|
||||
|
|
Loading…
Reference in a new issue