Remove remaining reply fallbacks code (#28610)

* Remove remaining reply fallbacks code

as MSC2781 has been merged

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-12-02 13:13:12 +00:00 committed by GitHub
parent 00aadf1580
commit 84709df3c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 74 deletions

View file

@ -128,7 +128,7 @@ describe("<EditMessageComposer/>", () => {
const expectedBody = {
...editedEvent.getContent(),
"body": " * original message + edit",
"body": "* original message + edit",
"m.new_content": {
"body": "original message + edit",
"msgtype": "m.text",
@ -160,7 +160,7 @@ describe("<EditMessageComposer/>", () => {
const content = createEditContent(model, editedEvent);
expect(content).toEqual({
"body": " * hello world",
"body": "* hello world",
"msgtype": "m.text",
"m.new_content": {
"body": "hello world",
@ -183,10 +183,10 @@ describe("<EditMessageComposer/>", () => {
const content = createEditContent(model, editedEvent);
expect(content).toEqual({
"body": " * hello *world*",
"body": "* hello *world*",
"msgtype": "m.text",
"format": "org.matrix.custom.html",
"formatted_body": " * hello <em>world</em>",
"formatted_body": "* hello <em>world</em>",
"m.new_content": {
"body": "hello *world*",
"msgtype": "m.text",
@ -210,10 +210,10 @@ describe("<EditMessageComposer/>", () => {
const content = createEditContent(model, editedEvent);
expect(content).toEqual({
"body": " * blinks __quickly__",
"body": "* blinks __quickly__",
"msgtype": "m.emote",
"format": "org.matrix.custom.html",
"formatted_body": " * blinks <strong>quickly</strong>",
"formatted_body": "* blinks <strong>quickly</strong>",
"m.new_content": {
"body": "blinks __quickly__",
"msgtype": "m.emote",
@ -238,7 +238,7 @@ describe("<EditMessageComposer/>", () => {
const content = createEditContent(model, editedEvent);
expect(content).toEqual({
"body": " * ✨sparkles✨",
"body": "* ✨sparkles✨",
"msgtype": "m.emote",
"m.new_content": {
"body": "✨sparkles✨",
@ -264,7 +264,7 @@ describe("<EditMessageComposer/>", () => {
// TODO Edits do not properly strip the double slash used to skip
// command processing.
expect(content).toEqual({
"body": " * //dev/null is my favourite place",
"body": "* //dev/null is my favourite place",
"msgtype": "m.text",
"m.new_content": {
"body": "//dev/null is my favourite place",

View file

@ -196,9 +196,9 @@ describe("EditWysiwygComposer", () => {
// Then
screen.getByText("Save").click();
const expectedContent = {
"body": ` * foo bar`,
"body": `* foo bar`,
"format": "org.matrix.custom.html",
"formatted_body": ` * foo bar`,
"formatted_body": `* foo bar`,
"m.new_content": {
body: "foo bar",
format: "org.matrix.custom.html",

View file

@ -88,9 +88,9 @@ describe("createMessageContent", () => {
// Then
expect(content).toEqual({
"body": " * *__hello__ world*",
"body": "* *__hello__ world*",
"format": "org.matrix.custom.html",
"formatted_body": ` * ${message}`,
"formatted_body": `* ${message}`,
"msgtype": "m.text",
"m.new_content": {
body: "*__hello__ world*",

View file

@ -418,8 +418,8 @@ describe("message", () => {
// Then
const { msgtype, format } = mockEvent.getContent();
const expectedContent = {
"body": ` * ${newMessage}`,
"formatted_body": ` * ${newMessage}`,
"body": `* ${newMessage}`,
"formatted_body": `* ${newMessage}`,
"m.new_content": {
body: "Replying to this new content",
format: "org.matrix.custom.html",