diff options
author | Matthew Hodgson <matthew@matrix.org> | 2015-03-14 00:09:21 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2015-03-14 00:09:21 +0000 |
commit | 256fe08963895cf1078f4f57c1c2673529fa25cd (patch) | |
tree | 9025c78b31cfcaf3e6231ff10401fbe4c620da49 /contrib/vertobot/bot.pl | |
parent | Merge pull request #108 from matrix-org/metrics (diff) | |
download | synapse-256fe08963895cf1078f4f57c1c2673529fa25cd.tar.xz |
uncommited WIP from MWC
Diffstat (limited to '')
-rwxr-xr-x | contrib/vertobot/bot.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/vertobot/bot.pl b/contrib/vertobot/bot.pl index 828fc48786..0430a38aa8 100755 --- a/contrib/vertobot/bot.pl +++ b/contrib/vertobot/bot.pl @@ -175,13 +175,12 @@ sub on_room_message my $verto_connecting = $loop->new_future; $bot_verto->connect( %{ $CONFIG{"verto-bot"} }, - on_connected => sub { - warn("[Verto] connected to websocket"); - $verto_connecting->done($bot_verto) if not $verto_connecting->is_done; - }, on_connect_error => sub { die "Cannot connect to verto - $_[-1]" }, on_resolve_error => sub { die "Cannot resolve to verto - $_[-1]" }, -); +)->then( sub { + warn("[Verto] connected to websocket"); + $verto_connecting->done($bot_verto) if not $verto_connecting->is_done; +}); Future->needs_all( $bot_matrix->login( %{ $CONFIG{"matrix-bot"} } )->then( sub { |