-
Notifications
You must be signed in to change notification settings - Fork 56
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 transfer of tags and dm status on room upgrade #547
Conversation
bc46f22
to
38e5526
Compare
tests/30rooms/60version_upgrade.pl
Outdated
my ( $user, $room_id ) = @_; | ||
|
||
# Download account data events from sync | ||
matrix_sync( $user )->then( sub { |
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.
How about using GET /_matrix/client/r0/user/{user}/account_data/m.direct
(matrix-org/matrix-spec-proposals#1339) ?
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.
Ah cool.
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.
Indeed this is already a function:
sytest/tests/10apidoc/44account_data.pl
Lines 71 to 79 in 665210b
sub matrix_get_room_account_data | |
{ | |
my ( $user, $room_id, $type, $content ) = @_; | |
do_request_json_for( $user, | |
method => "GET", | |
uri => "/r0/user/:user_id/rooms/$room_id/account_data/$type", | |
); | |
} |
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.
looks good but I think it would be nice to avoid the sync...
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.
lgtm apart from comment nitpicking. Please fix typos and merge!
tests/30rooms/60version_upgrade.pl
Outdated
} | ||
} | ||
|
||
# Didn't find an direct romo with our room ID |
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.
"an direct romo"?
Co-Authored-By: anoadragon453 <[email protected]>
…nto anoa/dm_room_upgrade
Synapse PR: matrix-org/synapse#4412
Adds 2 tests to check that the same room tags and
m.direct
status is set on a room before and after an upgrade.