In my app I’m trying to create a message visible only to chat agent using the method executePostLivechatAgentAssigned
.
With the follow code both parts receive the message.
const modifyCreator = await modify.getCreator();
const blockBuilder = modifyCreator.getBlockBuilder();
blockBuilder.addActionsBlock({
blockId: 'subreddits',
elements: [
blockBuilder.newButtonElement({
text: blockBuilder.newPlainTextObject('Vitrine'),
style: ButtonStyle.PRIMARY,
url: 'https://trinks.com/'
})
],
});
const infoMsgBuilder = modifyCreator
.startMessage()
.setRoom(context.room)
.setBlocks(blockBuilder);
modify.getNotifier().notifyUser(user, infoMsgBuilder.getMessage());
await modify.getCreator().finish(infoMsgBuilder);