Skip to content

Commit 85fb268

Browse files
committed
replacing actionId for message text
1 parent 86cf132 commit 85fb268

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

handler/ExecuteLivechatBlockActionHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class ExecuteLivechatBlockActionHandler {
2020
try {
2121
const interactionData = this.context.getInteractionData();
2222

23-
const { visitor: { token }, room, container: { id, type }, actionId } = interactionData;
23+
const { visitor: { token }, room, container: { id, type }, value } = interactionData;
2424

2525
if (type !== UIKitIncomingInteractionContainerType.MESSAGE || !room) { return this.context.getInteractionResponder().successResponse(); }
2626

@@ -34,7 +34,7 @@ export class ExecuteLivechatBlockActionHandler {
3434
if (!visitor) { return this.context.getInteractionResponder().successResponse(); }
3535
const appUser = await this.read.getUserReader().getAppUser(this.app.getID()) as IUser;
3636

37-
await createLivechatMessage(rid, this.read, this.modify, { text: actionId }, visitor);
37+
await createLivechatMessage(rid, this.read, this.modify, { text: value }, visitor);
3838

3939
await deleteAllActionBlocks(this.modify, appUser, id);
4040

lib/Message.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const createDialogflowMessage = async (rid: string, read: IRead, modify:
2121
type: TextObjectType.PLAINTEXT,
2222
text: payload.text,
2323
},
24+
value: payload.text,
2425
actionId: payload.actionId ? payload.actionId : payload.text,
2526
...payload.buttonStyle && { style: payload.buttonStyle },
2627
} as IButtonElement));

0 commit comments

Comments
 (0)