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

fix(deps): update version.slack to v1.43.0 (main) #3277

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 17, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.slack.api:slack-app-backend 1.42.1 -> 1.43.0 age adoption passing confidence
com.slack.api:slack-api-model 1.42.1 -> 1.43.0 age adoption passing confidence
com.slack.api:slack-api-client 1.42.1 -> 1.43.0 age adoption passing confidence

Release Notes

slackapi/java-slack-sdk (com.slack.api:slack-app-backend)

v1.43.0: version 1.43.0

Compare Source

Announcements

Assistant Apps in Bolt

This version includes the folllowing APIs and Events API payloads:

We're planning to add a more convenient way to develop AI assistant apps in the near future, but we can already develop such with the following primitive code:

app.event(AssistantThreadStartedEvent.class, (req, ctx) -> {
  String channelId = req.getEvent().getAssistantThread().getChannelId();
  String threadTs = req.getEvent().getAssistantThread().getThreadTs();
  app.executorService().submit(() -> {
    try {
      ctx.client().assistantThreadsSetTitle(r -> r.channelId(channelId).threadTs(threadTs).title("New chat"));
      ctx.client().chatPostMessage(r -> r.channel(channelId).threadTs(threadTs).text("Hi, how can I help you today?"));
      ctx.client().assistantThreadsSetSuggestedPrompts(r -> r.channelId(channelId).threadTs(threadTs).title("How are you?")
        .prompts(Collections.singletonList(new SuggestedPrompt("What does SLACK stand for?")))
      );
    } catch (Exception e) {
      ctx.logger.error("Failed to handle assistant thread started event: {e}", e);
    }
  });
  return ctx.ack();
});

app.event(AssistantThreadContextChangedEvent.class, (req, ctx) -> {
  app.executorService().submit(() -> {
    String channelId = req.getEvent().getAssistantThread().getChannelId();
    String threadTs = req.getEvent().getAssistantThread().getThreadTs();
    // TODO: Store req.getEvent().getAssistantThread() for the following conversation
  });
  return ctx.ack();
});

app.event(MessageEvent.class, (req, ctx) -> {
  if (req.getEvent().getChannelType().equals("im") && req.getEvent().getThreadTs() != null) {
    String channelId = req.getEvent().getChannel();
    String threadTs = req.getEvent().getThreadTs();
    app.executorService().submit(() -> {
      try {
        ctx.client().assistantThreadsSetStatus(r -> r.channelId(channelId).threadTs(threadTs).status("is typing..."));
        Thread.sleep(500L);
        ctx.client().chatPostMessage(r -> r.channel(channelId).threadTs(threadTs).text("Here you are!"));
      } catch (Exception e) {
        ctx.logger.error("Failed to handle assistant thread started event: {e}", e);
        try {
          ctx.client().chatPostMessage(r -> r.channel(channelId).threadTs(threadTs).text(":warning: Sorry, something went wrong during processing your request!"));
        } catch (Exception ee) {
          ctx.logger.error("Failed to inform the error to the end-user: {ee}", ee);
        }
      }
    });
  }
  return ctx.ack();
});

Changes

  • [slack-api-client] #​1371 Add assistant.threads.* APIs and related event payloads - Thanks @​seratch
  • [slack-api-client] Add missing properties in web API responses - Thanks @​seratch


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner September 17, 2024 00:49
@renovate renovate bot enabled auto-merge September 17, 2024 00:49
@renovate renovate bot added this pull request to the merge queue Sep 17, 2024
Merged via the queue into main with commit ff64b5a Sep 17, 2024
12 of 15 checks passed
@renovate renovate bot deleted the renovate/main-version.slack branch September 17, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants