forked from vxmppb/vxmppb
Removing invite. Just adding user to channel as member.
removing white space.
This commit is contained in:
parent
4666afd597
commit
9695b125a2
30
index.js
30
index.js
|
@ -455,7 +455,7 @@ try {
|
||||||
lang: 'en',
|
lang: 'en',
|
||||||
mam: 'true',
|
mam: 'true',
|
||||||
members_only: 'true',
|
members_only: 'true',
|
||||||
persistent: 'true',
|
persistent: 'false',
|
||||||
public: 'false',
|
public: 'false',
|
||||||
public_list: 'false',
|
public_list: 'false',
|
||||||
title: 'Secure channel generated by https://vxmppb.tk',
|
title: 'Secure channel generated by https://vxmppb.tk',
|
||||||
|
@ -491,31 +491,10 @@ try {
|
||||||
},
|
},
|
||||||
json: true
|
json: true
|
||||||
};
|
};
|
||||||
// invite users
|
|
||||||
const inviteMember = {
|
|
||||||
method: 'POST',
|
|
||||||
url: xmpp_api_url + '/send_direct_invitation',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
Authorization: xmpp_auth
|
|
||||||
},
|
|
||||||
body: {
|
|
||||||
name: xmpp_muc_name,
|
|
||||||
service: xmpp_muc_server,
|
|
||||||
password: '',
|
|
||||||
reason: 'vXMPPb Meeting Invite',
|
|
||||||
users: key
|
|
||||||
},
|
|
||||||
json: true
|
|
||||||
};
|
|
||||||
request(addMember, function(error, response, body) {
|
request(addMember, function(error, response, body) {
|
||||||
if (error) throw new Error(error);
|
if (error) throw new Error(error);
|
||||||
console.log(body);
|
console.log(body);
|
||||||
});
|
});
|
||||||
request(inviteMember, function(error, response, body) {
|
|
||||||
if (error) throw new Error(error);
|
|
||||||
console.log(body);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
debug();
|
debug();
|
||||||
|
@ -556,12 +535,13 @@ try {
|
||||||
debug();
|
debug();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Shutsdown bot if admin sends shutdown command (linux)
|
// Shutsdown bot if admin sends shutdown command (linux)
|
||||||
else if (message === "sudo shutdown now -h") {
|
else if (message === "sudo shutdown now -h") {
|
||||||
if (from != user_jid) {
|
if (from != user_jid) {
|
||||||
xmpp.send(from, pc);
|
xmpp.send(from, from + " is not in the sudoers file. This incident will be reported.");
|
||||||
|
setTimeout(() => {
|
||||||
|
xmpp.send(from, "lol...get it!?");
|
||||||
|
}, 2000);
|
||||||
} else {
|
} else {
|
||||||
// send shutdown message
|
// send shutdown message
|
||||||
xmpp.send(from, "Alrighty, shutting down. Goodbye!");
|
xmpp.send(from, "Alrighty, shutting down. Goodbye!");
|
||||||
|
|
Reference in New Issue
Block a user