diff options
Diffstat (limited to 'internal/ap/resolve.go')
-rw-r--r-- | internal/ap/resolve.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/internal/ap/resolve.go b/internal/ap/resolve.go index c5c9efd65..8d116751c 100644 --- a/internal/ap/resolve.go +++ b/internal/ap/resolve.go @@ -27,8 +27,7 @@ import ( ) // ResolveStatusable tries to resolve the given bytes into an ActivityPub Statusable representation. -// It will then perform normalization on the Statusable by calling NormalizeStatusable, so that -// callers don't need to bother doing extra steps. +// It will then perform normalization on the Statusable. // // Works for: Article, Document, Image, Video, Note, Page, Event, Place, Profile func ResolveStatusable(ctx context.Context, b []byte) (Statusable, error) { @@ -73,11 +72,16 @@ func ResolveStatusable(ctx context.Context, b []byte) (Statusable, error) { return nil, newErrWrongType(err) } - NormalizeStatusableContent(statusable, rawStatusable) + NormalizeContent(statusable, rawStatusable) + NormalizeAttachments(statusable, rawStatusable) + NormalizeSummary(statusable, rawStatusable) + NormalizeName(statusable, rawStatusable) + return statusable, nil } // ResolveStatusable tries to resolve the given bytes into an ActivityPub Accountable representation. +// It will then perform normalization on the Accountable. // // Works for: Application, Group, Organization, Person, Service func ResolveAccountable(ctx context.Context, b []byte) (Accountable, error) { @@ -114,5 +118,7 @@ func ResolveAccountable(ctx context.Context, b []byte) (Accountable, error) { return nil, newErrWrongType(err) } + NormalizeSummary(accountable, rawAccountable) + return accountable, nil } |