This feature enhancement introduces the ability to add users to a threaded case in Slack when they are mentioned. This functionality aims to streamline collaboration by ensuring that all relevant participants are included in the case discussions.
Key Changes:
New Enum Values:
Added add_user and do_nothing actions to CaseNotificationActions in enums.py.
User Mention Handling:
Implemented handle_user_mention function in case/interactive.py to detect user mentions in messages.
Extracts mentioned users and checks if they are part of the case.
Sends a private message to the user who mentioned others, offering to add the mentioned users to the case.
User Addition Workflow:
Added add_users_to_case function to handle the addition of users to a case when the "Add Them" button is clicked.
Utilizes AddUserMetadata to manage user data and case context.
Middleware Enhancements:
Introduced add_user_middleware in middleware.py to process user addition requests.
Ensures the correct context is passed for user addition actions.
UI Components:
Created UI blocks for user notification and action buttons in Slack messages.
Utilized DefaultBlockIds for consistent block identification.
Model Updates:
Added AddUserMetadata class in models.py to encapsulate user and case metadata.
This feature enhancement introduces the ability to add users to a threaded case in Slack when they are mentioned. This functionality aims to streamline collaboration by ensuring that all relevant participants are included in the case discussions.
Key Changes:
New Enum Values:
add_user
anddo_nothing
actions toCaseNotificationActions
inenums.py
.User Mention Handling:
handle_user_mention
function incase/interactive.py
to detect user mentions in messages.User Addition Workflow:
add_users_to_case
function to handle the addition of users to a case when the "Add Them" button is clicked.AddUserMetadata
to manage user data and case context.Middleware Enhancements:
add_user_middleware
inmiddleware.py
to process user addition requests.UI Components:
DefaultBlockIds
for consistent block identification.Model Updates:
AddUserMetadata
class inmodels.py
to encapsulate user and case metadata.