From e7fbf5739bd07b1cfd7531dd9362af200c414c23 Mon Sep 17 00:00:00 2001 From: BangN Date: Mon, 11 Jan 2016 15:01:05 +1100 Subject: [PATCH] users can specify their own matrix host server --- src/matrix.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix.coffee b/src/matrix.coffee index 1a3f96e..bf29d46 100644 --- a/src/matrix.coffee +++ b/src/matrix.coffee @@ -34,7 +34,7 @@ class Matrix extends Adapter run: -> @robot.logger.info "Run #{@robot.name}" - client = sdk.createClient('https://matrix.org') + client = sdk.createClient(process.env.HUBOT_MATRIX_HOST_SERVER || 'https://matrix.org') client.login 'm.login.password', { user: @robot.name password: process.env.HUBOT_MATRIX_PASSWORD @@ -46,7 +46,7 @@ class Matrix extends Adapter @access_token = data.access_token @robot.logger.info "Logged in #{@user_id}" @client = sdk.createClient - baseUrl: 'https://matrix.org' + baseUrl: process.env.HUBOT_MATRIX_HOST_SERVER || 'https://matrix.org' accessToken: @access_token userId: @user_id @client.on 'syncComplete', =>