From 256fe08963895cf1078f4f57c1c2673529fa25cd Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 14 Mar 2015 00:09:21 +0000 Subject: uncommited WIP from MWC --- contrib/vertobot/bridge.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'contrib/vertobot/bridge.pl') diff --git a/contrib/vertobot/bridge.pl b/contrib/vertobot/bridge.pl index e1a07f6659..a551850f40 100755 --- a/contrib/vertobot/bridge.pl +++ b/contrib/vertobot/bridge.pl @@ -86,7 +86,7 @@ sub create_virtual_user "user": "$localpart" } EOT - )->get; + )->get; warn $response->as_string if ($response->code != 200); } @@ -266,17 +266,21 @@ my $as_url = $CONFIG{"matrix-bot"}->{as_url}; Future->needs_all( $http->do_request( - method => "POST", - uri => URI->new( $CONFIG{"matrix"}->{server}."/_matrix/appservice/v1/register" ), - content_type => "application/json", - content => < "POST", + uri => URI->new( $CONFIG{"matrix"}->{server}."/_matrix/appservice/v1/register" ), + content_type => "application/json", + content => <then( sub{ + my ($response) = (@_); + warn $response->as_string if ($response->code != 200); + return Future->done; + }), $verto_connecting, )->get; -- cgit 1.4.1