fix: don't get chat after accepting invite
This will now only return the chatId, since getting the chat at this point is unreliable.
This commit is contained in:
parent
e2351db722
commit
e717915f94
2 changed files with 5 additions and 7 deletions
|
|
@ -66,10 +66,9 @@ client.on('message', async msg => {
|
|||
}
|
||||
} else if(msg.body.startsWith('!join ')) {
|
||||
const inviteCode = msg.body.split(' ')[1];
|
||||
|
||||
try {
|
||||
const chat = await client.acceptInvite(inviteCode);
|
||||
msg.reply(`Joined *${chat.name}*!`);
|
||||
await client.acceptInvite(inviteCode);
|
||||
msg.reply('Joined the group!');
|
||||
} catch(e) {
|
||||
msg.reply('That invite code seems to be invalid.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue