Skip to content
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

fix: schema mismatch for message received #2248

Merged
merged 6 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Composer/packages/client/src/utils/dialogUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function getDialog(dialogs: DialogInfo[], dialogId: string) {
export const eventTypeKey: string = SDKTypes.OnDialogEvent;
export const intentTypeKey: string = SDKTypes.OnIntent;
export const activityTypeKey: string = SDKTypes.OnActivity;
export const messageTypeKey: string = SDKTypes.OnMessageActivity;
export const messageTypeKey: string = SDKTypes.OnMessageEventActivity;
export const regexRecognizerKey: string = SDKTypes.RegexRecognizer;

export function getFriendlyName(data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const uiSchema: { [key in SDKTypes]?: UiSchema } = {
[SDKTypes.OnInvokeActivity]: {
...triggerUiSchema,
},
[SDKTypes.OnMessageReceivedActivity]: {
[SDKTypes.OnMessageActivity]: {
...triggerUiSchema,
},
[SDKTypes.OnMessageDeleteActivity]: {
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/lib/shared/src/appschema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2331,14 +2331,14 @@ export const appschema: OBISchema = {
},
},
},
'Microsoft.OnMessageReceivedActivity': {
'Microsoft.OnMessageActivity': {
$role: 'unionType(Microsoft.ITriggerCondition)',
title: 'On MessageRecieved activity',
description:
"Actions to perform on receipt of an activity with type 'MessageRecieved'. Overrides Intent trigger.",
type: 'object',
properties: {
...$properties(SDKTypes.OnMessageReceivedActivity),
...$properties(SDKTypes.OnMessageActivity),
condition: {
$role: 'expression',
title: 'Condition',
Expand Down
6 changes: 3 additions & 3 deletions Composer/packages/lib/shared/src/labelMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ export const ConceptLabels: { [key in ConceptLabelKey]?: LabelOverride } = {
title: formatMessage('Conversation invoked'),
subtitle: formatMessage('Invoke activity'),
},
[SDKTypes.OnMessageActivity]: {
[SDKTypes.OnMessageEventActivity]: {
title: formatMessage('Message events'),
subtitle: formatMessage('Message recieved activity'),
subtitle: formatMessage('Message activity'),
},
[SDKTypes.OnMessageReceivedActivity]: {
[SDKTypes.OnMessageActivity]: {
title: formatMessage('Message received'),
subtitle: formatMessage('Message recieved activity'),
},
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/lib/shared/src/types/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export enum SDKTypes {
OnHandoffActivity = 'Microsoft.OnHandoffActivity',
OnIntent = 'Microsoft.OnIntent',
OnInvokeActivity = 'Microsoft.OnInvokeActivity',
OnMessageEventActivity = 'Microsoft.OnMessageEventActivity',
OnMessageActivity = 'Microsoft.OnMessageActivity',
OnMessageReceivedActivity = 'Microsoft.OnMessageReceivedActivity',
OnMessageDeleteActivity = 'Microsoft.OnMessageDeleteActivity',
OnMessageReactionActivity = 'Microsoft.OnMessageReactionActivity',
OnMessageUpdateActivity = 'Microsoft.OnMessageUpdateActivity',
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/lib/shared/src/viewUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const dialogGroups: DialogGroupsMap = {
SDKTypes.OnUnknownIntent,
SDKTypes.OnDialogEvent,
SDKTypes.OnActivity,
SDKTypes.OnMessageActivity,
SDKTypes.OnMessageEventActivity,
SDKTypes.OnCustomEvent,
],
},
Expand All @@ -129,7 +129,7 @@ export const dialogGroups: DialogGroupsMap = {
[DialogGroup.MESSAGE_EVENTS]: {
label: 'Message events',
types: [
SDKTypes.OnMessageReceivedActivity,
SDKTypes.OnMessageActivity,
SDKTypes.OnMessageDeleteActivity,
SDKTypes.OnMessageReactionActivity,
SDKTypes.OnMessageUpdateActivity,
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/schemas/editor.schema
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"title": "Conversation invoked",
"subtitle": "Invoke activity"
},
"Microsoft.OnMessageReceivedActivity": {
"Microsoft.OnMessageActivity": {
"title": "Message recieved",
"subtitle": "Message recieved activity"
},
Expand Down
12 changes: 6 additions & 6 deletions Composer/packages/server/schemas/sdk.schema
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@
"$ref": "#/definitions/Microsoft.OnInvokeActivity"
},
{
"title": "Microsoft.OnMessageReceivedActivity",
"title": "Microsoft.OnMessageActivity",
"description": "Actions to perform on receipt of an activity with type 'MessageReceived'. Overrides Intent trigger.",
"$ref": "#/definitions/Microsoft.OnMessageReceivedActivity"
"$ref": "#/definitions/Microsoft.OnMessageActivity"
},
{
"title": "Microsoft.OnMessageDeleteActivity",
Expand Down Expand Up @@ -4891,9 +4891,9 @@
"$ref": "#/definitions/Microsoft.OnInvokeActivity"
},
{
"title": "Microsoft.OnMessageReceivedActivity",
"title": "Microsoft.OnMessageActivity",
"description": "Actions to perform on receipt of an activity with type 'Message'. Overrides Intent trigger.",
"$ref": "#/definitions/Microsoft.OnMessageReceivedActivity"
"$ref": "#/definitions/Microsoft.OnMessageActivity"
},
{
"title": "Microsoft.OnMessageDeleteActivity",
Expand Down Expand Up @@ -8184,7 +8184,7 @@
}
]
},
"Microsoft.OnMessageReceivedActivity": {
"Microsoft.OnMessageActivity": {
"$role": "union(Microsoft.ITriggerCondition)",
"title": "On Message activity",
"description": "Actions to perform on receipt of an activity with type 'Message'. Overrides Intent trigger.",
Expand All @@ -8195,7 +8195,7 @@
"description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)",
"type": "string",
"pattern": "^[a-zA-Z][a-zA-Z0-9.]*$",
"const": "Microsoft.OnMessageReceivedActivity"
"const": "Microsoft.OnMessageActivity"
},
"$copy": {
"title": "$copy",
Expand Down