Skip to content

How to set the charset? #213

@tarzasai

Description

@tarzasai

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions