Skip to content

Commit d5a8496

Browse files
committed
Fix Calling ->then in void context warning
PR #1205 added a call to `matrix_join_room`, but did not await the result, which resulted in a bunch of warnings: ``` ** Calling ->then in void context at tests/10apidoc/33room-members.pl line 82. ** IO::Async::Future=HASH(0x557d6befbf40) IO::Async::Future=HASH(0x557d6befbf40) lost a sequence Future at /home/rav/lib/perl5/Net/Async/HTTP/Connection.pm line 472. ``` Waiting for the join to complete before proceeding fixes the warnings.
1 parent 8c06539 commit d5a8496

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/50federation/32room-getevent.pl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@
6060
my ( $outbound_client, $creator, $user_id, $room, $remaining_user ) = @_;
6161
my $first_home_server = $creator->server_name;
6262
my $room_id = $room->room_id;
63-
matrix_join_room($remaining_user, $room_id);
64-
6563
my $message_id;
6664

67-
# have the creator send a message into the room, which we will try to
68-
# fetch.
69-
matrix_send_room_text_message( $creator, $room_id, body => "body1" )
65+
matrix_join_room( $remaining_user, $room_id )
7066
->then( sub {
67+
# have the creator send a message into the room, which we will try to
68+
# fetch.
69+
matrix_send_room_text_message( $creator, $room_id, body => "body1" );
70+
})->then( sub {
7171
( $message_id ) = @_;
7272

7373
$outbound_client->do_request_json(

0 commit comments

Comments
 (0)