Skip to content

Commit

Permalink
Correção para não abrir ticket ao mandar mensagens em grupo
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh authored Jun 8, 2022
1 parent b4f63b1 commit 086683b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions backend/src/services/WbotServices/wbotMessageListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,15 @@ const handleMessage = async (

//IGNORAR MENSAGENS DE GRUPO
const Settingdb = await Settings.findOne({
where: { key: "CheckMsgIsGroup" },
where: { key: 'CheckMsgIsGroup' }
});
if (Settingdb?.value == "enabled") {
if (msg.from === "status@broadcast" || msg.author != null) {
if (Settingdb?.value == 'enabled') {
const chat = await msg.getChat();
if (
msg.from === "status@broadcast" ||
msg.author != null ||
chat.isGroup
) {
return;
}
}
Expand Down

0 comments on commit 086683b

Please sign in to comment.