show only latest conversation instead of nested pervious messages

This commit is contained in:
10G Meow 2022-04-20 12:55:26 +00:00 committed by N Pex
parent 98848e210e
commit 7c53c07c70

View file

@ -88,10 +88,7 @@ export default {
while (lines.length && !lines[0].startsWith('> ')) lines.shift();
// Reply fallback has a blank line after it, so remove it to prevent leading newline
if (lines[0] === '') lines.shift();
const text = lines
.map((item) => { return item.replace(/^> (<.*> )?/g, ''); })
.reverse()
.join('\n');
const text = lines[0].replace(/^> (<.*> )?/g, '');
if (text) {
return text;
}
@ -126,7 +123,7 @@ export default {
/**
* Classes to set for the message. Currently only for "messageIn", TODO: - detect messageIn or messageOut.
*/
messageClasses() {
return {'messageIn':true,'from-admin':this.senderIsAdminOrModerator(this.event)}
},