create matrix config subsection

master
lub 7 years ago
parent 0eeccfb805
commit bc18211cee

@ -1,6 +1,7 @@
baseurl: 'https://example.org' matrix:
accesstoken: 't0ps3cr3t' baseurl: 'https://example.org'
userid: '@jd:example.org' accesstoken: 't0ps3cr3t'
userid: '@jd:example.org'
infrastructure: '/home/qwer/scripts' infrastructure: '/home/qwer/scripts'
ssh: ssh:

@ -5,9 +5,9 @@ const yaml = require('js-yaml');
const config = yaml.safeLoad(fs.readFileSync('config.yaml')); const config = yaml.safeLoad(fs.readFileSync('config.yaml'));
const matrixclient = sdk.createClient({ const matrixclient = sdk.createClient({
baseUrl: config.baseurl, baseUrl: config.matrix.baseurl,
accessToken: config.accesstoken, accessToken: config.matrix.accesstoken,
userId: config.userid userId: config.matrix.userid
}); });
const ssh = new node_ssh(); const ssh = new node_ssh();