Reject unsupported Reddit chat capabilities
This commit is contained in:
1 parent
8d932fcf36
commit
712226cd43
8 files changed
+100
-8
No files matched your search
@@ -4,6 +4,7 @@ import {
|
||||
chooseConversationIntent,
|
||||
formatConversationAsUntrustedData,
|
||||
hybridMediaAskSafetyFailure,
|
||||
conversationReplySafetyFailure,
|
||||
mergeConversationState,
|
||||
isSafeConversationReply,
|
||||
isSafeHybridMediaAsk,
|
||||
@@ -183,4 +184,11 @@ describe('conversation state', () => {
|
||||
expect(isSafeConversationReply('We should meet up sometime.')).toBe(false);
|
||||
expect(isSafeConversationReply("I'm 32M in the UK. What kind of music are you into?")).toBe(true);
|
||||
});
|
||||
|
||||
it('rejects replies that suggest Reddit chat capabilities the application cannot deliver', () => {
|
||||
expect(conversationReplySafetyFailure('I wish I could send you a voice note right now.'))
|
||||
.toBe('reply suggests an unsupported Reddit chat capability');
|
||||
expect(isSafeConversationReply('Want to hop on a video call?')).toBe(false);
|
||||
expect(isSafeConversationReply('Tell me the rest here, I am listening.')).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user