|
|
@ -1,12 +1,14 @@
|
|
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const fs = require('fs');
|
|
|
|
const sdk = require('matrix-js-sdk');
|
|
|
|
const sdk = require('matrix-js-sdk');
|
|
|
|
|
|
|
|
const spawn = require('child_process').spawn;
|
|
|
|
|
|
|
|
const yaml = require('js-yaml');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const config = yaml.safeLoad(fs.readFileSync('config.yaml'));
|
|
|
|
|
|
|
|
|
|
|
|
var userid = '';
|
|
|
|
|
|
|
|
var accesstoken = '';
|
|
|
|
|
|
|
|
var matrixclient = sdk.createClient({
|
|
|
|
var matrixclient = sdk.createClient({
|
|
|
|
baseUrl: 'https://imninja.net',
|
|
|
|
baseUrl: config.baseurl,
|
|
|
|
accessToken: accesstoken,
|
|
|
|
accessToken: config.accesstoken,
|
|
|
|
userId: userid
|
|
|
|
userId: config.userid
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/*matrixclient.on('RoomMember.membership', function(event, member) {
|
|
|
|
/*matrixclient.on('RoomMember.membership', function(event, member) {
|
|
|
|