Merge branch '294-show-latest-message-onReply' into 'dev'

show only latest conversation instead of nested pervious messages

See merge request keanuapp/keanuapp-weblite!72
This commit is contained in:
N Pex 2022-04-20 12:55:28 +00:00
commit 315e3f6bd5

View file

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