mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-31 06:05:22 +00:00
add fowarded message's user to database
This commit is contained in:
@@ -43,6 +43,13 @@ const addUserHandler = async (ctx, next) => {
|
|||||||
usersToAdd.push(addUser(message.reply_to_message.from));
|
usersToAdd.push(addUser(message.reply_to_message.from));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
message.forward_from &&
|
||||||
|
!await isUser(message.forward_from)
|
||||||
|
) {
|
||||||
|
usersToAdd.push(addUser(message.forward_from));
|
||||||
|
}
|
||||||
|
|
||||||
await Promise.all(usersToAdd);
|
await Promise.all(usersToAdd);
|
||||||
|
|
||||||
return next();
|
return next();
|
||||||
|
Reference in New Issue
Block a user