|
|
@ -10,15 +10,6 @@ global.matrixClient = sdk.createClient({
|
|
|
|
userId: config.matrix.userid
|
|
|
|
userId: config.matrix.userid
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Autojoin for the bot (keep commented out when not needed to prevent abuse)
|
|
|
|
|
|
|
|
/*matrixClient.on('RoomMember.membership', function(event, member) {
|
|
|
|
|
|
|
|
if(member.membership === 'invite' && member.userId === userid) {
|
|
|
|
|
|
|
|
matrixClient.joinRoom(member.roomId).done(function() {
|
|
|
|
|
|
|
|
console.log('Auto-joined %s', member.roomId);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//captures unhandled rejections for easier debugging
|
|
|
|
//captures unhandled rejections for easier debugging
|
|
|
|
process.on('unhandledRejection', (reason) => {
|
|
|
|
process.on('unhandledRejection', (reason) => {
|
|
|
|
console.log('Reason: ' + reason);
|
|
|
|
console.log('Reason: ' + reason);
|
|
|
|