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

How to set the charset? #213

Open
tarzasai opened this issue Jan 22, 2021 · 0 comments
Open

How to set the charset? #213

tarzasai opened this issue Jan 22, 2021 · 0 comments

Comments

@tarzasai
Copy link

Sorry for the stupid question, I'm new to Slack development.
I receive a missing_charset warning in response all the times on SlackClient.postMessage(), and I checked the samples and look everywhere in the code but I don't understand how to set the charset.

My SlackClient instance:

  @Bean
  public SlackClient getSlackClient() {
    SlackClientRuntimeConfig runtimeConfig = SlackClientRuntimeConfig.builder()
      .setTokenSupplier(() -> slackAppToken)
      .build();
    return SlackClientFactory.defaultFactory().build(runtimeConfig);
  }

My postmessage code:

  public static void simplePostMessage(SlackClient slackClient, String channel, String text) {
    try {
      slackClient.postMessage(
        ChatPostMessageParams.builder()
          .setText(text)
          .setChannelId(channel)
          .build())
        .join().unwrapOrElseThrow();
    } catch (Exception e) {
      log.error("slackClient.postMessage", e);
    }
  }

Thank you.

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

No branches or pull requests

1 participant