Update ui.js

This commit is contained in:
ErikrafT 2025-05-07 18:35:51 -03:00 committed by GitHub
parent a4b21435cd
commit 36c70ce1e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -209,7 +209,7 @@ class PeersUI {
} }
} }
else if (text) { else if (text) {
if (window.pairdrop.contentModeration.isSpam(text)) { if (window.pairdrop.contentModeration.isSpam(text).isSpam) {
window.pairdrop.toast.show('Texto bloqueado: Possível spam detectado'); window.pairdrop.toast.show('Texto bloqueado: Possível spam detectado');
return; return;
} }
@ -257,7 +257,7 @@ class PeersUI {
} }
} }
else if (text) { else if (text) {
if (window.pairdrop.contentModeration.isSpam(text)) { if (window.pairdrop.contentModeration.isSpam(text).isSpam) {
window.pairdrop.toast.show('Texto bloqueado: Possível spam detectado'); window.pairdrop.toast.show('Texto bloqueado: Possível spam detectado');
return; return;
} }
@ -2052,7 +2052,7 @@ class ReceiveTextDialog extends Dialog {
async _onText(text, peerId) { async _onText(text, peerId) {
try { try {
// Verifica se o texto é spam // Verifica se o texto é spam
if (window.pairdrop.contentModeration.isSpam(text)) { if (window.pairdrop.contentModeration.isSpam(text).isSpam) {
window.pairdrop.toast.show('Texto bloqueado: Possível spam detectado'); window.pairdrop.toast.show('Texto bloqueado: Possível spam detectado');
return; return;
} }