fixes actor discovery
This commit is contained in:
42
db/migrations/1756040234_updated_activitypub_actors.go
Normal file
42
db/migrations/1756040234_updated_activitypub_actors.go
Normal file
@@ -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)
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -173,6 +173,9 @@ export function createPopupFromTrail(trail: Trail) {
|
|||||||
? emptyStateTrailLight
|
? emptyStateTrailLight
|
||||||
: emptyStateTrailDark;
|
: emptyStateTrailDark;
|
||||||
const popup = new M.Popup({ maxWidth: "420px" });
|
const popup = new M.Popup({ maxWidth: "420px" });
|
||||||
|
if (!trail.expand?.author) {
|
||||||
|
return popup
|
||||||
|
}
|
||||||
// Create a container element for the popup content
|
// Create a container element for the popup content
|
||||||
const linkElement = document.createElement("a");
|
const linkElement = document.createElement("a");
|
||||||
linkElement.href = `/map/trail/${handleFromRecordWithIRI(trail)}/${trail.id}`; // Set href safely
|
linkElement.href = `/map/trail/${handleFromRecordWithIRI(trail)}/${trail.id}`; // Set href safely
|
||||||
|
|||||||
Reference in New Issue
Block a user