add Ended poll text to ended poll reply formatted body (#10146)
This commit is contained in:
parent
3eee91d4ed
commit
b4565f5024
3 changed files with 28 additions and 0 deletions
|
@ -20,6 +20,7 @@ import escapeHtml from "escape-html";
|
|||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
||||
import { MsgType } from "matrix-js-sdk/src/@types/event";
|
||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
||||
import { M_POLL_END } from "matrix-js-sdk/src/@types/polls";
|
||||
|
||||
import { PERMITTED_URL_SCHEMES } from "../HtmlUtils";
|
||||
import { makeUserPermalink, RoomPermalinkCreator } from "./permalinks/Permalinks";
|
||||
|
@ -110,6 +111,15 @@ export function getNestedReplyText(
|
|||
};
|
||||
}
|
||||
|
||||
if (M_POLL_END.matches(ev.getType())) {
|
||||
return {
|
||||
html:
|
||||
`<mx-reply><blockquote><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>` +
|
||||
`<br>Ended poll</blockquote></mx-reply>`,
|
||||
body: `> <${mxid}>Ended poll\n\n`,
|
||||
};
|
||||
}
|
||||
|
||||
// This fallback contains text that is explicitly EN.
|
||||
switch (msgtype) {
|
||||
case MsgType.Text:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue