Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@serkanh
Copy link
Owner

@serkanh serkanh commented Sep 25, 2025

  1. Environment Variable Configuration:
    • Added API_BASE_URL, API_TIMEOUT, and SESSION_TIMEOUT_MINUTES configuration from environment variables
    • Removed all hardcoded API URLs (like sre-bot-api:8000)
  2. Whitelist Functionality:
    - Added user whitelist feature with WHITELIST_ENABLED and WHITELIST_USERS environment variables
    - Non-whitelisted users receive a friendly GA message
  3. Bot User ID Tracking:
    - Added global bot_user_id initialization at startup
    - Properly identifies when the bot is mentioned using actual bot ID
  4. Enhanced Session Management:
    - 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
  5. Acknowledgment Messages:
    - Added immediate acknowledgment messages for better UX
    - Sends "processing" messages before API calls
  6. Parent Thread Context:
    - Added fetch_parent_message_content() to get thread history
    - Fetches parent message and thread context for better conversation continuity
  7. Enhanced API Session Creation:
    - Passes thread context and parent message data to API
    - Includes timestamps and user profile information
  8. API Response Time Tracking:
    - Added timing measurements for API calls
    - Logs response times for monitoring
  9. Startup Event Handler:
    - Added FastAPI startup event to initialize bot user ID
    - Ensures bot is properly configured before handling requests
  10. Improved Message Handler:
    - Only responds to direct bot mentions (using actual bot ID)
    - Properly handles threaded vs non-threaded messages
    - Creates threads for direct channel mentions

fix linting

moar formatting
@serkanh serkanh force-pushed the slack-message-handling branch from ec307b3 to 9da3f61 Compare September 25, 2025 16:28
@serkanh serkanh merged commit ecefbaa into main Sep 25, 2025
2 checks passed
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.

2 participants