-
-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug where original event was inserted into timeline instead of the edit event #3398
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andybalaam
force-pushed
the
andybalaam/insert-edit-no-original
branch
from
May 24, 2023 10:51
672fbbb
to
ebbb2d8
Compare
While attempting to test a new change, I discovered that the test "should allow edits to be added to thread timeline" did not actually fail if its assertions failed. Further, those assertions were incorrect. So this change fixes the test to create the thread, wait for it to be initialised, and then add events to it. This simplifies the flow and ensures the test fails if something unexpected happens.
Modifies fetchEditsWhereNeeded to allow edits of threaded messages. The code before prevented any relations from fetching edits, but of course events in threads are relations. We definitely want thread messages to get their edits fetched, and I assume this is working in the real code, probably because the event being looked at is some kind of eventmapped thing that doesn't have proper relations visible on it. In tests, if we don't make this change, we can't see edits getting fetched.
This test demonstrates the current behaviour, which contains a bug - we don't actually add the right event to the timeline.
andybalaam
force-pushed
the
andybalaam/insert-edit-no-original
branch
from
May 25, 2023 01:59
ebbb2d8
to
09be26a
Compare
andybalaam
changed the base branch from
develop
to
andybalaam/test-inserting-ondemand-edit-event
May 25, 2023 01:59
andybalaam
requested review from
t3chguy and
kerryarchibald
and removed request for
a team
May 25, 2023 02:54
t3chguy
approved these changes
May 25, 2023
Base automatically changed from
andybalaam/test-inserting-ondemand-edit-event
to
develop
May 25, 2023 15:32
su-ex
added a commit
to SchildiChat/matrix-js-sdk
that referenced
this pull request
Dec 13, 2023
* Ensure we do not add relations to the wrong timeline ([\matrix-org#3427](matrix-org#3427)). Fixes element-hq/element-web#25450 and element-hq/element-web#25494. * Deprecate `QrCodeEvent`, `SasEvent` and `VerificationEvent` ([\matrix-org#3386](matrix-org#3386)). * Move crypto classes into a separate namespace ([\matrix-org#3385](matrix-org#3385)). * Mention deno support in the README ([\matrix-org#3417](matrix-org#3417)). Contributed by @sigmaSd. * Mark room version 10 as safe ([\matrix-org#3425](matrix-org#3425)). * Prioritise entirely supported flows for UIA ([\matrix-org#3402](matrix-org#3402)). * Add methods to terminate idb worker ([\matrix-org#3362](matrix-org#3362)). * Total summary count ([\matrix-org#3351](matrix-org#3351)). Contributed by @toger5. * Audio concealment ([\matrix-org#3349](matrix-org#3349)). Contributed by @toger5. * Correctly accumulate sync summaries. ([\matrix-org#3366](matrix-org#3366)). Fixes element-hq/element-web#23345. * Keep measuring a call feed's volume after a stream replacement ([\matrix-org#3361](matrix-org#3361)). Fixes element-hq/element-call#1051. * Element-R: Avoid uploading a new fallback key at every `/sync` ([\matrix-org#3338](matrix-org#3338)). Fixes element-hq/element-web#25215. * Accumulate receipts for the main thread and unthreaded separately ([\matrix-org#3339](matrix-org#3339)). Fixes element-hq/element-web#24629. * Remove spec non-compliant extended glob format ([\matrix-org#3423](matrix-org#3423)). Fixes element-hq/element-web#25474. * Fix bug where original event was inserted into timeline instead of the edit event ([\matrix-org#3398](matrix-org#3398)). Contributed by @andybalaam. * Only add a local receipt if it's after an existing receipt ([\matrix-org#3399](matrix-org#3399)). Contributed by @andybalaam. * Attempt a potential workaround for stuck notifs ([\matrix-org#3384](matrix-org#3384)). Fixes element-hq/element-web#25406. Contributed by @andybalaam. * Fix verification bug with `pendingEventOrdering: "chronological"` ([\matrix-org#3382](matrix-org#3382)).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The bug was introduced in #3384
Part of element-hq/element-web#10954
Here's what your changelog entry will look like:
🐛 Bug Fixes