Skip to content
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

Add tests for various forms of rich replies #1799

Merged
merged 4 commits into from Mar 27, 2024

Conversation

tadzik
Copy link
Collaborator

@tadzik tadzik commented Mar 20, 2024

Cleaned up and expanded #1797

@tadzik tadzik requested a review from Half-Shot March 20, 2024 15:07
@tadzik tadzik requested a review from a team as a code owner March 20, 2024 15:07
@tadzik tadzik force-pushed the tadzik/replies-tests branch 2 times, most recently from 391d19c to f1267ba Compare March 21, 2024 10:09
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable, thanks for improving the test coverage!

@@ -386,6 +393,9 @@ export class MatrixHandler {
* @param {Object} event : The Matrix member event.
*/
private _onMemberEvent(req: BridgeRequest, event: OnMemberEventData) {
if (event.origin_server_ts) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only joins, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, should be, yes.

Copy link
Contributor

@Half-Shot Half-Shot Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, also we need to bound these by leave time too. Or maybe just delete the map entry, given you won't be replying to anything after you've left.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, it still works in this state, since your subsequent join will reset the map entry –so you won't be able to see messages from before your most recent join.

Still, I'd rather be explicit and have a test for it than rely on this quirk.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Half-Shot Half-Shot merged commit 4af7d30 into matrix-org:develop Mar 27, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants