Skip to content

Commit d7c061f

Browse files
committed
adding data prop
1 parent 7bd8796 commit d7c061f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

enum/Dialogflow.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export interface IDialogflowQuickReplyOptions {
1515
text: string;
1616
actionId?: string;
1717
buttonStyle?: ButtonStyle;
18-
departmentName?: string;
18+
data?: {
19+
[prop: string]: any;
20+
};
1921
}
2022

2123
export interface IDialogflowAccessToken {

lib/Message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const createDialogflowMessage = async (rid: string, read: IRead, modify:
2828
};
2929

3030
if (payload.actionId && payload.actionId === ActionIds.PERFORM_HANDOVER) {
31-
buttonElement.value = payload.departmentName ? payload.departmentName : undefined;
31+
buttonElement.value = payload.data && payload.data.departmentName ? payload.data.departmentName : undefined;
3232
}
3333

3434
return buttonElement;

0 commit comments

Comments
 (0)