Actually store raw data for imports

This commit is contained in:
Melody Becker 2025-06-12 16:23:17 +02:00
parent 5bf66a7808
commit f580a116f2
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
2 changed files with 2 additions and 0 deletions

View file

@ -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}

View file

@ -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