mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-29 01:41:47 +00:00
Webhook: Granular event support (closes #1240) Problem: WEBHOOK_URL accepted only one endpoint that fired for all events (signup only). No way to route events to different endpoints. Solution: - Added WEBHOOK_EVENTS constant (signup, oauth_signup, signin, signout, user_deleted, user_role_changed) - Added _parse_webhook_config() in webhook.py supporting three formats: 1. Legacy single URL (no admin change needed, backwards-compatible) 2. Newline/comma-separated JSON objects with optional events filter 3. Full JSON array format - Added post_webhook_event() dispatcher with event-scope filtering; URLs with events=null act as catch-all (preserves legacy behaviour) - Updated auths.py: both signup paths now call post_webhook_event with event='signup' - Updated oauth.py: OAuth signup uses post_webhook_event with event='oauth_signup' and includes provider name in payload Example extended config: [{"url": "https://slack.com/...", "events": ["signup"]}, {"url": "https://discord.com/..."}] Chat Bubbles: Fix widescreen layout overflow (closes #5975) Problem: In bubble mode, messages with YAML/JSON code blocks stretched the bubble to full viewport width. The inner wrapper had min-w-full applied unconditionally, forcing the flex container to full width. Fix: Changed min-w-full to conditional in UserMessage.svelte: - Bubble mode: min-w-0 (lets flex child shrink, bubble hugs content) - Classic mode: min-w-full (unchanged, full-width layout preserved) Tests: Added 15 unit tests in test/util/test_webhook.py covering _parse_webhook_config (formats, edge cases) and post_webhook_event (event filtering, catch-all, payload injection, backwards compat). |
||
|---|---|---|
| .. | ||
| access_control | ||
| images | ||
| mcp | ||
| telemetry | ||
| actions.py | ||
| anthropic.py | ||
| asgi_middleware.py | ||
| audit.py | ||
| auth.py | ||
| automations.py | ||
| calendar.py | ||
| channels.py | ||
| chat.py | ||
| code_interpreter.py | ||
| embeddings.py | ||
| files.py | ||
| filter.py | ||
| groups.py | ||
| headers.py | ||
| logger.py | ||
| middleware.py | ||
| misc.py | ||
| models.py | ||
| oauth.py | ||
| payload.py | ||
| pdf_generator.py | ||
| plugin.py | ||
| rate_limit.py | ||
| redis.py | ||
| response.py | ||
| sanitize.py | ||
| security_headers.py | ||
| session_pool.py | ||
| task.py | ||
| tools.py | ||
| validate.py | ||
| webhook.py | ||