This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works because
event.getContent()
is smart enough to pull from the latest replacing event (message edit),this._replacingEvent.getContent()["m.new_content"]
.We probably want to also update
matrix-js-sdk
event.getRelation()
to pull fromgetContent()
as well,src/models/event.ts#L1077-L1087
. I can create a follow-up PR after this is deemed acceptable 🙇There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the js-sdk makes sense, though I'm a bit concerned that the impact could be greater than we anticipate. Until it's reported to cause bugs, we should leave it alone I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know what you mean 🤔
I feel like we may be leaving other clients in the dust if we don't change it though. Someone making a client, bridge, etc just falls into the pitfall of not supporting this use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have a breaking change queued up for the js-sdk's next release, so squeezing it in there would be the safest bet I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'll skip on adjusting it there because trying to make the change and I run into the
rel_type
andevent_id
constraint which isn't present form.in_repy_to
and not sure of the downstream effects.