|
|
|
@ -22,3 +22,22 @@ lubiland['infrastructure']['rebuild'].exec = (args, room, event) => {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lubiland['heimdall'] = {};
|
|
|
|
|
|
|
|
|
|
lubiland['heimdall']['join'] = {};
|
|
|
|
|
lubiland['heimdall']['join'].regex = /^(.*)$/;
|
|
|
|
|
lubiland['heimdall']['join'].usage = '<container>';
|
|
|
|
|
lubiland['heimdall']['join'].exec = (args, room, event) => {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
const roomId = args[1];
|
|
|
|
|
|
|
|
|
|
matrixClient.joinRoom(roomId)
|
|
|
|
|
.then((success) => {
|
|
|
|
|
matrixClient.sendNotice(room.roomId, ' joined ' + success.name);
|
|
|
|
|
}, (fail) => {
|
|
|
|
|
matrixClient.sendNotice(room.roomId, 'error while trying to join the other room: ' + fail.message);
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};
|