From f580a116f2cd7c2cb0ac23f2312359c18dfb7c6b Mon Sep 17 00:00:00 2001 From: mstar Date: Thu, 12 Jun 2025 16:23:17 +0200 Subject: [PATCH] Actually store raw data for imports --- activitypub/importNote.go | 1 + activitypub/importUserAndServer.go | 1 + 2 files changed, 2 insertions(+) diff --git a/activitypub/importNote.go b/activitypub/importNote.go index 27e363a..b451a1d 100644 --- a/activitypub/importNote.go +++ b/activitypub/importNote.go @@ -107,6 +107,7 @@ func importRemoteNoteRecursive( default: return "", other.Error("activitypub", "failed to check db for note", err) } + dbNote.RawData = body dbNote.CreatedAt = data.Published if data.Summary != nil { dbNote.ContentWarning = sql.NullString{Valid: true, String: *data.Summary} diff --git a/activitypub/importUserAndServer.go b/activitypub/importUserAndServer.go index 9f42805..08ecc1b 100644 --- a/activitypub/importUserAndServer.go +++ b/activitypub/importUserAndServer.go @@ -468,6 +468,7 @@ func ImportRemoteAccountByAPUrl(apUrl string) (*models.User, error) { } user.Verified = true user.FinishedRegistration = true + user.RawData = body if !sliceutils.ContainsFunc(user.Roles, func(t models.UserToRole) bool { return t.Role.ID == models.DefaultUserRole.ID