Poll reply fixes and other misc improvements
This commit is contained in:
parent
a1e9e3894e
commit
78fdb94362
15 changed files with 42 additions and 39 deletions
|
|
@ -163,9 +163,11 @@ class Util {
|
|||
event_id: replyToEvent.getId()
|
||||
}
|
||||
}
|
||||
let senderContent = replyToEvent.getContent()
|
||||
|
||||
const senderContentBody = Object.getOwnPropertyDescriptor(senderContent,'body') ? senderContent.body : Object.values(senderContent)[0].question.body
|
||||
// Prefix the content with reply info (seems to be a legacy thing)
|
||||
const prefix = replyToEvent.getContent().body.split('\n').map((item, index) => {
|
||||
const prefix = senderContentBody.split('\n').map((item, index) => {
|
||||
return "> " + (index == 0 ? ("<" + replyToEvent.getSender() + "> ") : "") + item;
|
||||
}).join('\n');
|
||||
content.body = prefix + "\n\n" + content.body;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue