Skip to content

A self-hosted dashboard that puts all your feeds in one place

Use `url` as fallback when `open_link` isn't present

Svilen Markov1dc691772e20
diff --git a/internal/glance/widget-changedetection.go b/internal/glance/widget-changedetection.go
index 1a59816..f076728 100644
--- a/internal/glance/widget-changedetection.go
+++ b/internal/glance/widget-changedetection.go
@@ -89,7 +89,8 @@ func (r changeDetectionWatchList) sortByNewest() changeDetectionWatchList {
type changeDetectionResponseJson struct {
Title string `json:"title"`
- URL string `json:"open_link"`
+ URL string `json:"url"`
+ OpenLink string `json:"open_link"`
LastChanged int64 `json:"last_changed"`
DateCreated int64 `json:"date_created"`
PreviousHash string `json:"previous_md5"`
@@ -153,8 +154,13 @@ func fetchWatchesFromChangeDetection(instanceURL string, requestedWatchIDs []str
watchJson := responses[i]
+ openURL := watchJson.OpenLink
+ if openURL == "" {
+ openURL = watchJson.URL
+ }
+
watch := changeDetectionWatch{
- URL: watchJson.URL,
+ URL: openURL,
DiffURL: fmt.Sprintf("%s/diff/%s?from_version=%d", instanceURL, requestedWatchIDs[i], watchJson.LastChanged-1),
}