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

feat: add slack message shortcut to answer question ❓ #509

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

ramiAbdou
Copy link
Member

@ramiAbdou ramiAbdou commented Sep 10, 2024

Description ✏️

Follow up to #491.

This PR:

  • Adds body parsing functionality for URL encoded requests (ie: application/x-www-form-urlencoded).
  • Abstracts the populating of the raw body for both URL encoded and json requests.
  • Implements the POST /slack/shortcuts API endpoint, which is where Slack will send requests for shortcuts.
  • Implements a slack.message.answer Bull job, which ultimately calls the answerPublicQuestion method. That method follows the same flow as the answerChatbotQuestion with slightly different UX (no "loading" message).
  • Abstracts the populating of thread references in a chatbot response in the addThreadReferences method.
  • Slightly tweaks the isQuestion prompt such that it doesn't require appropriate punctuation for it to be a question.
  • Updates the Chatbot Question Asked Mixpanel event to include a Type: 'DM' | 'Public'.

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

@ramiAbdou ramiAbdou self-assigned this Sep 10, 2024
@ramiAbdou ramiAbdou marked this pull request as ready for review September 10, 2024 23:40
@ramiAbdou ramiAbdou merged commit b27c9f3 into main Sep 10, 2024
2 checks passed
@ramiAbdou ramiAbdou deleted the rami/message-shortcut branch September 10, 2024 23:40
iperalta7 pushed a commit to iperalta7/oyster that referenced this pull request Sep 25, 2024
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

Successfully merging this pull request may close these issues.

1 participant