Adjust the scam detector
* Ignore HTML tags in the message so we don't sometimes false-positive based on the base64-encoded image data shared in chat. * Remove 'session' from the messenger list, it is a more obscure messenger and source of too many false positives.
This commit is contained in:
parent
200c025a78
commit
ba5fb2d48d
|
@ -9,15 +9,20 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
// Message sans HTML tags, so we don't false positive on base64-encoded image data.
|
||||||
|
filteredMessage() {
|
||||||
|
return this.message.replace(/<(.|\n)+?>/g, "");
|
||||||
|
},
|
||||||
|
|
||||||
// Scam/spam detection and warning.
|
// Scam/spam detection and warning.
|
||||||
maybeWhatsAppScam() {
|
maybeWhatsAppScam() {
|
||||||
return this.message.match(/whats\s*app/i);
|
return this.filteredMessage.match(/whats\s*app/i);
|
||||||
},
|
},
|
||||||
maybePhoneNumberScam() {
|
maybePhoneNumberScam() {
|
||||||
return this.message.match(/\b(phone number|phone|digits|cell number|your number|ur number|text me)\b/i);
|
return this.filteredMessage.match(/\b(phone number|phone|digits|cell number|your number|ur number|text me)\b/i);
|
||||||
},
|
},
|
||||||
maybeOffPlatformScam() {
|
maybeOffPlatformScam() {
|
||||||
return this.message.match(/\b(telegram|signal|kik|session)\b/i);
|
return this.filteredMessage.match(/\b(telegram|signal|kik)\b/i);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user