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 transfer of tags and dm status on room upgrade #547

Merged
merged 6 commits into from
Jan 28, 2019

Conversation

anoadragon453
Copy link
Member

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.

my ( $user, $room_id ) = @_;

# Download account data events from sync
matrix_sync( $user )->then( sub {
Copy link
Member

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) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah cool.

Copy link
Member Author

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:

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",
);
}

Copy link
Member

@richvdh richvdh left a 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...

Copy link
Member

@richvdh richvdh left a 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 Show resolved Hide resolved
}
}

# Didn't find an direct romo with our room ID
Copy link
Member

Choose a reason for hiding this comment

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

"an direct romo"?

@anoadragon453 anoadragon453 merged commit 998413a into develop Jan 28, 2019
@anoadragon453 anoadragon453 deleted the anoa/dm_room_upgrade branch January 28, 2019 15:17
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.

2 participants