-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[communication-chat] Data Loss Prevention and TextOnlyChat #29700
base: communication-chat/1.6.0-beta.2
Are you sure you want to change the base?
Conversation
senderCommunicationIdentifier: mockCommunicationIdentifier, | ||
deletedOn: new Date("2020-06-26T18:06:06Z"), | ||
metadata: { tags: "tag" }, | ||
policyViolation: { state: "contentBlocked"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also have a mock for warning as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a test for without policyViolation
const { state } = policyVolation; | ||
const result: PolicyViolation = { | ||
result: state | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty confused in reading after the renaming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other developer would be confused about the difference between state
and result
here.
@@ -157,3 +161,17 @@ export interface UploadChatImageResult { | |||
|
|||
/** Type of Supported Attachments. */ | |||
export type ChatAttachmentType = "image" | "file" | "unknown"; | |||
|
|||
/** State of Policy Violation message. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** State of Policy Violation message. */ | |
/** Result of Policy Violation message. */ |
|
||
/** Policy violation of a message (if applicable). */ | ||
export interface PolicyViolation { | ||
/** State of Policy Violation message. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** State of Policy Violation message. */ | |
/** Result of Policy Violation message. */ |
@@ -67,3 +67,13 @@ directive: | |||
transform: > | |||
$["x-ms-enum"].modelAsString = false; | |||
``` | |||
|
|||
### Set PolicyViolationMessageState Model as string false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why when we do the renaming, the rename is not applied to Chat gateway? Chat Gateway keep using state
but only the client side using result
? Is this what we want?
expectedIdentifier.communicationUser?.id, | ||
); | ||
assert.deepEqual(responseMessagingPolicy, expectedMessagingPolicy); | ||
assert.isTrue(responseMessagingPolicy?.textOnlyChat); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this textOnlyChat nullable? Could we test that scenario?
const { | ||
senderCommunicationIdentifier: expectedIdentifier, | ||
content: expectedContent, | ||
policyViolation: expectedPolicyViolation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the expectedPolicyViolation
being defined?
senderCommunicationIdentifier: mockCommunicationIdentifier, | ||
deletedOn: new Date("2020-06-26T18:06:06Z"), | ||
metadata: { tags: "tag" }, | ||
policyViolation: { state: "contentBlocked"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a test for without policyViolation
Packages impacted by this PR
Issues associated with this PR
Describe the problem that is addressed by this PR
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists