From a00d92e93b477183d1952b420fb4686885ede608 Mon Sep 17 00:00:00 2001 From: Christian Beutel <> Date: Sun, 24 Aug 2025 14:59:40 +0200 Subject: [PATCH] fixes actor discovery --- .../1756040234_updated_activitypub_actors.go | 42 +++++++++++++++++++ web/src/lib/util/maplibre_util.ts | 3 ++ 2 files changed, 45 insertions(+) create mode 100644 db/migrations/1756040234_updated_activitypub_actors.go diff --git a/db/migrations/1756040234_updated_activitypub_actors.go b/db/migrations/1756040234_updated_activitypub_actors.go new file mode 100644 index 00000000..e777d511 --- /dev/null +++ b/db/migrations/1756040234_updated_activitypub_actors.go @@ -0,0 +1,42 @@ +package migrations + +import ( + "encoding/json" + + "github.com/pocketbase/pocketbase/core" + m "github.com/pocketbase/pocketbase/migrations" +) + +func init() { + m.Register(func(app core.App) error { + collection, err := app.FindCollectionByNameOrId("pbc_1295301207") + if err != nil { + return err + } + + // update collection data + if err := json.Unmarshal([]byte(`{ + "listRule": "", + "viewRule": "" + }`), &collection); err != nil { + return err + } + + return app.Save(collection) + }, func(app core.App) error { + collection, err := app.FindCollectionByNameOrId("pbc_1295301207") + if err != nil { + return err + } + + // update collection data + if err := json.Unmarshal([]byte(`{ + "listRule": "user = @request.auth.id", + "viewRule": "user = @request.auth.id" + }`), &collection); err != nil { + return err + } + + return app.Save(collection) + }) +} diff --git a/web/src/lib/util/maplibre_util.ts b/web/src/lib/util/maplibre_util.ts index 53010ef5..a260b7c4 100644 --- a/web/src/lib/util/maplibre_util.ts +++ b/web/src/lib/util/maplibre_util.ts @@ -173,6 +173,9 @@ export function createPopupFromTrail(trail: Trail) { ? emptyStateTrailLight : emptyStateTrailDark; const popup = new M.Popup({ maxWidth: "420px" }); + if (!trail.expand?.author) { + return popup + } // Create a container element for the popup content const linkElement = document.createElement("a"); linkElement.href = `/map/trail/${handleFromRecordWithIRI(trail)}/${trail.id}`; // Set href safely