fix: Gotify and Web Push providers are switched off at the next restart

Aberta
#2,103 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@Wikid82 já está trabalhando nisso.

Desde 1/12/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

backend

What

EnsureNotifyOnlyProviderMigration runs once per start and touches every provider whose migration_state is not migrated or deprecated. Providers created while Charon is running have an empty migration_state, so on the next start every non-Discord one (Gotify, Web Push, Telegram and so on) is set to enabled=false and migration_state=deprecated. Web Push provisioning creates its row with Enabled=true and an empty state, so after a restart its subscribe path reports it as disabled.

Where

  • backend/internal/api/routes/routes.go (call near line 438-491)
  • backend/internal/services/notification_service.go (EnsureNotifyOnlyProviderMigration, around lines 745-790)

Evidence

Seen in every restart during container checks on a branch that adds Gotify and Web Push providers through the API. The function body is identical on development. Found by reading the code and by observation; not yet reproduced by a dedicated test.

Severity

Medium (user-visible: providers stop sending after a restart).

Suggested approach

Set migration_state when a provider is created at runtime (or limit the migration to rows that predate the migration), and add a test that creates a Gotify and a Web Push provider, runs the start-up migration, and expects both to stay enabled.

Linguagem predominante
Go
Estrelas
17
Forks
2
Merge médio
1h 42min
PRs com merge (30d)
173

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Wikid82/Charon

Todas as issues de Wikid82/Charon

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.