updated slack message handling #10
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- Added user whitelist feature with WHITELIST_ENABLED and WHITELIST_USERS environment variables
- Non-whitelisted users receive a friendly GA message
- Added global bot_user_id initialization at startup
- Properly identifies when the bot is mentioned using actual bot ID
- Added current_user tracking to handle multi-user thread interactions
- Added update_session_thread() method for thread migration
- Sessions now properly track both original and current users
- Added immediate acknowledgment messages for better UX
- Sends "processing" messages before API calls
- Added fetch_parent_message_content() to get thread history
- Fetches parent message and thread context for better conversation continuity
- Passes thread context and parent message data to API
- Includes timestamps and user profile information
- Added timing measurements for API calls
- Logs response times for monitoring
- Added FastAPI startup event to initialize bot user ID
- Ensures bot is properly configured before handling requests
- Only responds to direct bot mentions (using actual bot ID)
- Properly handles threaded vs non-threaded messages
- Creates threads for direct channel mentions