Prevent location matching in bot messages
This commit is contained in:
1 parent
c21932389e
commit
d5ebdec076
8 files changed
+112
-2
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { isSafeOutboundMessage } from '../src/services/outbound-message-safety.js';
|
||||
|
||||
describe('outbound message location safety', () => {
|
||||
it.each([
|
||||
"I'm in London too.",
|
||||
"I'm also in Manchester, small world.",
|
||||
"We're both in England, that's handy.",
|
||||
"Sounds like we're in the same area.",
|
||||
"I'm not far from you at all.",
|
||||
"You're nearby, we should meet up.",
|
||||
"That's near me, small world.",
|
||||
"You're practically my neighbour.",
|
||||
"You're just down the road.",
|
||||
"I'm only 20 minutes away.",
|
||||
'Always nice finding another Brit.',
|
||||
'We could grab a drink sometime.',
|
||||
'Come over tonight.',
|
||||
])('rejects proximity or meeting implication: %s', (message) => {
|
||||
expect(isSafeOutboundMessage(message)).toBe(false);
|
||||
});
|
||||
|
||||
it.each([
|
||||
"I'm 34M in the UK. What are you into?",
|
||||
'That sounds fun, tell me more about it.',
|
||||
'Would you be comfortable sharing a selfie?',
|
||||
'Nice to meet you, what kind of music do you like?',
|
||||
])('allows remote conversation without a location comparison: %s', (message) => {
|
||||
expect(isSafeOutboundMessage(message)).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user