feat(notification): add email notification infrastructure, smtp configuration, and periodic background delivery job (#431)

* feat(notification): add email notification support and dedicated workflow

* feat(webui): add team email notification settings and test email dialog

* refactor(webui): remove redundant card header from email notification settings

* fix(notification): prevent sending notification emails to AI agents

* feat(notification): display project, avatar, upload time and resolve mention names in notification emails

* refactor(notification): remove uploadDebounceSeconds and naive workflow sleep

* refactor(notification): remove temporal notification workflow and keep email infrastructure

* fix(team): prevent leaking email notification settings and credentials in team settings

* feat(notification): add periodic background job for batched email notification delivery

* fix(notification): embed avatars and thumbnails as inline cid attachments
This commit is contained in:
Yiling-J
2026-09-28 09:58:59 +08:00
committed by GitHub
parent 94ea4c917a
commit d98f486c9d
33 changed files with 4021 additions and 20 deletions
+21
View File
@@ -223,6 +223,27 @@ describe('team api', () => {
expect(mockGetSettings).toHaveBeenCalledWith('t1')
})
it('GET /teams/:teamId/settings does not return emailNotification to readers', async () => {
mockGetSettings.mockResolvedValue({
semanticSearchEnabled: false,
transcode: { videoStrategy: 'best_match', hardwareAcceleration: 'off', threads: 0 },
appearance: { hideAgent: false },
})
const res = await app.request('/teams/t1/settings')
expect(res.status).toBe(200)
const data = await res.json()
expect(data.emailNotification).toBeUndefined()
expect(authzService.hasPermission).toHaveBeenCalledWith(
expect.objectContaining({
type: ResourceType.Team,
id: 't1',
permission: Permission.Read,
}),
)
})
it('PATCH /teams/:teamId/settings updates settings', async () => {
mockUpdateSettings.mockResolvedValue({ transcode: { videoStrategy: 'all' } })