Actually store raw data for imports
This commit is contained in:
parent
5bf66a7808
commit
f580a116f2
2 changed files with 2 additions and 0 deletions
|
@ -107,6 +107,7 @@ func importRemoteNoteRecursive(
|
||||||
default:
|
default:
|
||||||
return "", other.Error("activitypub", "failed to check db for note", err)
|
return "", other.Error("activitypub", "failed to check db for note", err)
|
||||||
}
|
}
|
||||||
|
dbNote.RawData = body
|
||||||
dbNote.CreatedAt = data.Published
|
dbNote.CreatedAt = data.Published
|
||||||
if data.Summary != nil {
|
if data.Summary != nil {
|
||||||
dbNote.ContentWarning = sql.NullString{Valid: true, String: *data.Summary}
|
dbNote.ContentWarning = sql.NullString{Valid: true, String: *data.Summary}
|
||||||
|
|
|
@ -468,6 +468,7 @@ func ImportRemoteAccountByAPUrl(apUrl string) (*models.User, error) {
|
||||||
}
|
}
|
||||||
user.Verified = true
|
user.Verified = true
|
||||||
user.FinishedRegistration = true
|
user.FinishedRegistration = true
|
||||||
|
user.RawData = body
|
||||||
|
|
||||||
if !sliceutils.ContainsFunc(user.Roles, func(t models.UserToRole) bool {
|
if !sliceutils.ContainsFunc(user.Roles, func(t models.UserToRole) bool {
|
||||||
return t.Role.ID == models.DefaultUserRole.ID
|
return t.Role.ID == models.DefaultUserRole.ID
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue