feat: Teams notifications#191
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Microsoft Teams as a first-class notification provider, wiring it through the frontend notification creation flow and the backend Shoutrrr-based provider registry as part of the broader notification extensions effort (#175).
Changes:
- Add
teamsto the supported notification type list and UI form flow (including validation + config building). - Introduce a Teams notification builder (host/webhook URL + optional title) and localized strings.
- Implement a backend Teams provider that converts the stored JSON config into a Shoutrrr
teams://target URL, with unit tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/lib/notifications.ts | Adds teams to the supported notification types list. |
| frontend/src/components/dialogs/teams-notification-builder.tsx | New Teams form fields + URL validation + config JSON builder. |
| frontend/src/components/dialogs/create-notification.tsx | Integrates Teams fields into the notification creation dialog, schema validation, and config builder. |
| frontend/messages/en.json | Adds Teams-related UI/validation strings (and tweaks a Shoutrrr placeholder). |
| frontend/messages/de.json | Adds German equivalents for Teams-related strings (and tweaks a Shoutrr placeholder). |
| backend/internal/hub/notifications/provider/teams.go | New Teams provider converting JSON config to Shoutrrr Teams URL. |
| backend/internal/hub/notifications/provider/teams_test.go | Unit tests for Teams provider parsing/validation and URL generation. |
| backend/internal/hub/notifications/provider/provider.go | Registers the Teams provider in the provider registry. |
| backend/internal/hub/models/notifications.go | Adds NotificationTypeTeams constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| } | ||
|
|
||
| const pattern = | ||
| /^\/webhookb2\/[0-9a-f-]{36}@[0-9a-f-]{36}\/IncomingWebhook\/[0-9a-f]{32}\/[0-9a-f-]{36}\/[A-Za-z0-9_-]+\/?$/i; |
There was a problem hiding this comment.
Only checked in frontend and not in backend?
There was a problem hiding this comment.
Also in a Url I generated it does /powerautomate, remove then maybe?
| return false; | ||
| } | ||
|
|
||
| if (!/^[a-z0-9.-]+\.webhook\.office\.com$/i.test(parsed.hostname)) { |
There was a problem hiding this comment.
It can also be azure.com or powerplatform.com (I only saw this until now).
Type of change
Description
Add ms teams notification provider
Part of #175