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

Notify Internal Slack when a thread gets 100+ replies 😅 #535

Open
tomas-salgado opened this issue Sep 28, 2024 · 1 comment
Open

Notify Internal Slack when a thread gets 100+ replies 😅 #535

tomas-salgado opened this issue Sep 28, 2024 · 1 comment
Assignees
Labels
Backend 🔌 This requires backend work (ie: DB, business logic). Bloomberg This issue is reserved for the Bloomberg Mentorship Program Feature 🚀 A new feature or improvement.

Comments

@tomas-salgado
Copy link
Collaborator

Issue Reserved for Bloomberg Mentorship Program

Description

Sometimes things get a little hectic in the family slack..😅 In the case that a single Slack thread gets 100+ replies, we want the admins to get a notification so that they can monitor the thread in case it is getting out of hand.

Acceptance Criteria

  • Implement a function within ‘packages/core/src/modules/slack/queries' that counts the number of replies a thread has (this will require counting how many times that particular threadId appears in the database)
  • This function should also check if the number of messages in the thread is exactly 100, in which case the function should send a notification to the internal slack with a message implying that a particular thread is getting long
  • This function should be called within the addSlackMessage function after adding a new message to the database

Additional Context

We have a function addSlackMessage that retrieves any new Slack message and adds it to the database (see here). Within this function, after adding the message to the database, we can trigger a new function that will count the number of replies in the given thread and notify the admins if there are exactly 100 messages in the thread.

To notify the admins, we can utilize the job notification.slack.send similar to as used here. Note that all we have to do is put the workspace as ‘internal’ and add a message. Make sure to specify which thread is getting long.

@tomas-salgado tomas-salgado added Feature 🚀 A new feature or improvement. Backend 🔌 This requires backend work (ie: DB, business logic). Bloomberg This issue is reserved for the Bloomberg Mentorship Program labels Sep 28, 2024
@ciaracade
Copy link
Contributor

I’ll take it his

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend 🔌 This requires backend work (ie: DB, business logic). Bloomberg This issue is reserved for the Bloomberg Mentorship Program Feature 🚀 A new feature or improvement.
Projects
None yet
Development

No branches or pull requests

2 participants