|
34 | 34 |
|
35 | 35 | matrix_set_room_guest_access( $user, $room_id, "can_join" )
|
36 | 36 | ->then( sub {
|
37 |
| - matrix_join_room( $guest_user, $room_id ) |
| 37 | + # we use join_room_synced as a proxy for ensuring that the join event |
| 38 | + # has propagated to the workers, otherwise the worker that receives |
| 39 | + # the event send request might not know that we are in the room. |
| 40 | + # (see https://github.com/matrix-org/sytest/issues/836) |
| 41 | + matrix_join_room_synced( $guest_user, $room_id ); |
38 | 42 | })->then( sub {
|
39 | 43 | matrix_send_room_text_message( $guest_user, $room_id, body => "sup" );
|
40 | 44 | })->then( sub {
|
|
125 | 129 |
|
126 | 130 | matrix_set_room_guest_access( $user, $room_id, "can_join" )
|
127 | 131 | ->then( sub {
|
128 |
| - matrix_join_room( $guest_user, $room_id ); |
| 132 | + matrix_join_room_synced( $guest_user, $room_id ); |
129 | 133 | })->then( sub {
|
130 | 134 | matrix_get_room_membership( $user, $room_id, $guest_user );
|
131 | 135 | })->then( sub {
|
|
154 | 158 | my $displayname_uri = "/r0/profile/:user_id/displayname";
|
155 | 159 |
|
156 | 160 | matrix_set_room_guest_access( $user, $room_id, "can_join" )->then( sub {
|
157 |
| - matrix_join_room( $guest_user, $room_id ); |
| 161 | + # we use join_room_synced as a proxy for ensuring that the join event |
| 162 | + # has propagated to the workers, otherwise the worker that receives |
| 163 | + # the profile request might not know that we are in the room. |
| 164 | + # (see https://github.com/matrix-org/sytest/issues/836) |
| 165 | + matrix_join_room_synced( $guest_user, $room_id ); |
158 | 166 | })->then( sub {
|
159 | 167 | do_request_json_for( $guest_user,
|
160 | 168 | method => "GET",
|
|
225 | 233 | })->then( sub {
|
226 | 234 | matrix_join_room( $remote_user, $room_id );
|
227 | 235 | })->then( sub {
|
228 |
| - matrix_join_room( $guest_user, $room_id ); |
| 236 | + matrix_join_room_synced( $guest_user, $room_id ); |
229 | 237 | })->then( sub {
|
230 | 238 | matrix_get_room_membership( $local_user, $room_id, $guest_user );
|
231 | 239 | })->then( sub {
|
|
0 commit comments