package server import ( "fmt" "net/http" "net/url" "prism/service/notification" ) func (s *Server) handleFragmentApps(w http.ResponseWriter, r *http.Request) { mappings, err := s.store.GetAllMappings() if err != nil { s.logger.Error("Failed to get mappings", "error", err) http.Error(w, "Internal server error", http.StatusInternalServerError) return } w.Header().Set("Content-Type", "text/html") _, _ = fmt.Fprint(w, s.getAppsListHTML(mappings)) //nolint:errcheck } func (s *Server) getAppsListHTML(mappings []notification.Mapping) string { if len(mappings) == 0 { return `

No apps registered yet. See real-world examples to get started.

` } signalLinked := false if s.integrations.Signal != nil { handlers := s.integrations.Signal.GetHandlers() if handlers != nil { account, _ := handlers.GetClient().GetLinkedAccount() signalLinked = account != nil } } telegramConfigured := s.cfg.IsTelegramEnabled() && s.cfg.TelegramChatID != 0 var html string html += `` return html }