diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-19 10:43:31 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-19 10:43:31 +0000 |
commit | d028207a6e421b97eae886a501e3e427577bab29 (patch) | |
tree | 4f452dfcb656771607eac291dfe34dd4ec49f812 /contrib/vertobot/bot.pl | |
parent | Merge branch 'release-v0.8.0' of github.com:matrix-org/synapse (diff) | |
parent | Update CHANGES (diff) | |
download | synapse-d028207a6e421b97eae886a501e3e427577bab29.tar.xz |
Merge branch 'release-v0.8.1' of github.com:matrix-org/synapse v0.8.1
Diffstat (limited to 'contrib/vertobot/bot.pl')
-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 { |