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

While using InitialOption, my Updated Message does not reflect the blocks #1049

Open
antonkad opened this issue Mar 24, 2022 · 0 comments
Open

Comments

@antonkad
Copy link

antonkad commented Mar 24, 2022

What happened

While receiving interactions, i'm modifiying my message and the blocks, in order to update the list in the 3rd static_select. Moreover than I'm reseting the inital option so that it take the most recent value in the list.

More precisly:

// version
versionTxt := slack.NewTextBlockObject("plain_text", "version", true, false)
versionOptions := createOptionBlockObjects(tags)
versionSelectBlock := slack.NewOptionsSelectBlockElement("static_select", versionTxt, "TAGS", versionOptions...)

optionText := slack.NewTextBlockObject(slack.PlainTextType, tags[0], false, false)
versionSelectBlock.InitialOption = slack.NewOptionBlockObject(tags[0], optionText, nil)

The resulted block outputed by slack.OptionDebug(true) does have the initialOption set everytime, some from my point of view slack is supposed to receive the proper updated blocks as wanted

            "initial_option":{
               "text":{
                  "type":"plain_text",
                  "text":"0.0.9"
               },
               "value":"0.0.9"
            }

Animation

Results on slack is aleatory, sometime it updates itself propely other time not and the interaction.BlockActionState.Values holds a previous value that is not coherent.

I have tried removing this last element static_select from the actions list. Then rebuilding it, but it does not change anything.

Expected behavior

Shall updates everytime properly.

Regards

Versions

  • Go: 1.17
  • slack-go/slack: v0.10.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants