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

Ouverte
#2,103 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@Wikid82 y travaille déjà.

Depuis le 1/12/2026.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.

Langage dominant
Go
Étoiles
17
Forks
2
Merge moyen
1 h 42 min
PR mergées (30 j)
173

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Wikid82/Charon

Toutes les issues de Wikid82/Charon

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.