Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Fix channelData replace in conversations #1979

Merged
merged 3 commits into from
Aug 21, 2020

Conversation

ashitikov
Copy link
Contributor

@ashitikov ashitikov commented Jun 10, 2020

#1925 introduced new bug:
When I'm trying to use channelData: { ephemeral: true } with dynamic blocks I get an empty ephemeral message in slack because channelData completely replaces instead of correct copying keys and values with template rendering.

@benbrown benbrown changed the base branch from master to main June 15, 2020 17:30
@benbrown
Copy link
Contributor

can you give me more information on how to reproduce this issue?

@ashitikov
Copy link
Contributor Author

ashitikov commented Jun 15, 2020

can you give me more information on how to reproduce this issue?

Hi! If you have a dialog
const dialog = new BotkitConversation('SOME_ID', controller);
Then you can add a question to this conversation:

dialog.addQuestion({
    text: 'How are you?',
    channelData: {
        ephemeral: true
    },
    blocks: async (template, vars) => {
        return [...some blocks...]
    }
});

As a developer I'm waiting that this question 'How are you?' will be ephemeral (only visible to that user) with blocks, but in fact this message does not contain any blocks, but becomes ephemeral.

Commenting out channelData { ephemeral: true } makes message not ephemeral, but blocks are visible as it should.

@benbrown
Copy link
Contributor

ah i see, thank you for the info.

@ashitikov
Copy link
Contributor Author

ah i see, thank you for the info.

Any progress on that? :)

@benbrown benbrown merged commit 74da283 into howdyai:main Aug 21, 2020
@benbrown
Copy link
Contributor

Sorry for the long wait. Thank you for this fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants