You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example of the source to a message that cannot be further edited:
{
"content": {
"body": "> <@20kdc:matrix.org> This is a message.\n\n * This is a reply to that message that I am going to edit.\nThis is an edit.",
"format": "org.matrix.custom.html",
"formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!yDMeZGveGjjPHJVagK%3Amatrix.org/%24unsiVC0GP7GC_W60VU6UIUtzqWeo11OxkV1xLhsX0_M\">In reply to</a><a href=\"https://matrix.to/#/%4020kdc%3Amatrix.org\">@20kdc:matrix.org</a><br />This is a message.</blockquote></mx-reply> * This is a reply to that message that I am going to edit.<br>This is an edit.",
"m.new_content": {
"body": "This is a reply to that message that I am going to edit.\nThis is an edit.",
"msgtype": "m.text"
},
"m.relates_to": {
"event_id": "$9DyIp-qkkWV_h7WHyYyvMaG-LflZUEynS0y_IUKsQmg",
"rel_type": "m.replace"
},
"msgtype": "m.text"
},
"origin_server_ts": 1687725600719,
"sender": "@20kdc:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 297,
"transaction_id": "m1687725600670.2"
},
"event_id": "$_ByLPPp9PABr6f7DOoxMf74_d5Wk7m4aoO_N9uWezmw",
"room_id": "!yDMeZGveGjjPHJVagK:matrix.org"
}
The text was updated successfully, but these errors were encountered:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'substring')
at RoomsInput.getContent (RoomsInput.js:236:35)
at RoomsInput.sendEditedMessage (RoomsInput.js:412:26)
at onSave (Message.jsx:811:39)
at onSubmit (Message.jsx:308:76)
at HTMLUnknownElement.callCallback2 (react-dom.development.js:3945:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:16)
at invokeGuardedCallback (react-dom.development.js:4056:31)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4070:25)
at executeDispatch (react-dom.development.js:8243:3)
at processDispatchQueueItemsInOrder (react-dom.development.js:8275:7)
Describe the bug
Um... See title or reproduction instructions?
Reproduction
Importantly,
m.new_content
will not haveformatted_body
in messages that break this way.Expected behavior
Uh... no error and for the message to be edited.
Platform and versions
Additional context
Materials that may or may not be useful:
Example of the source to a message that cannot be further edited:
The text was updated successfully, but these errors were encountered: