release 0.3.12: bump federated service VERSION, installer image version and mcp package version
release gate / check (push) Failing after 5m50s
release / smoke (push) Successful in 10m43s
release / publish (push) Failing after 10m4s

This commit is contained in:
Andrew S Erwin
2026-11-30 12:30:33 -06:00
parent 886777d739
commit 50c89c1653
8 changed files with 56 additions and 11 deletions
+17 -4
View File
@@ -179,10 +179,23 @@ func HandleCardDavConnectionsList(w http.ResponseWriter, r *http.Request) {
}
suggestions := []object{}
if nc := config.NextcloudSuggestion(); nc != "" {
suggestions = append(suggestions, object{
"kind": "nextcloud", "name": "Nextcloud contacts",
"url": nc + "/remote.php/dav/addressbooks/users/",
})
// If the caller already connected this Nextcloud's contacts (the
// unified Nextcloud connect creates a CardDAV row under this exact
// root), don't offer the "detected on this server" suggestion again.
root := nc + "/remote.php/dav/addressbooks/users/"
alreadyConnected := false
for _, row := range rows {
if u, _ := row["url"].(string); strings.HasPrefix(u, root) {
alreadyConnected = true
break
}
}
if !alreadyConnected {
suggestions = append(suggestions, object{
"kind": "nextcloud", "name": "Nextcloud contacts",
"url": root,
})
}
}
respond(w, 200, object{"connections": out, "allowed": allowed, "suggestions": suggestions}, nil)
}