summaryrefslogtreecommitdiff
path: root/internal/typeutils/astointernal.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-03-24 11:56:42 +0100
committerLibravatar GitHub <noreply@github.com>2025-03-24 10:56:42 +0000
commit27171a78ded38a7142aecfcaa75ede86f73b7a5b (patch)
tree6468899981ba4f6fd78cd95544ed1ded34120437 /internal/typeutils/astointernal.go
parent[chore]: Bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2 (#3927) (diff)
downloadgotosocial-27171a78ded38a7142aecfcaa75ede86f73b7a5b.tar.xz
[feature] Parse funkwhale `Album` as Statusable to allow barebones interacting with bandwagon (#3931)
* bump activity version * parse funkwhale / bandwagon album as statusable
Diffstat (limited to 'internal/typeutils/astointernal.go')
-rw-r--r--internal/typeutils/astointernal.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go
index 16aa430a3..741e1509e 100644
--- a/internal/typeutils/astointernal.go
+++ b/internal/typeutils/astointernal.go
@@ -434,9 +434,10 @@ func (c *Converter) ASStatusToStatus(ctx context.Context, statusable ap.Statusab
return nil, gtserror.SetMalformed(err)
}
- // Status was sent to us or dereffed
- // by us so it must be federated.
+ // Status was sent to us or dereffed by
+ // us so it must be federated and not local.
status.Federated = util.Ptr(true)
+ status.Local = util.Ptr(false)
// Derive interaction policy for this status.
status.InteractionPolicy = ap.ExtractInteractionPolicy(
@@ -446,9 +447,11 @@ func (c *Converter) ASStatusToStatus(ctx context.Context, statusable ap.Statusab
// Set approvedByURI if present,
// for later dereferencing.
- approvedByURI := ap.GetApprovedBy(statusable)
- if approvedByURI != nil {
- status.ApprovedByURI = approvedByURI.String()
+ if ipa, ok := statusable.(ap.InteractionPolicyAware); ok {
+ approvedByURI := ap.GetApprovedBy(ipa)
+ if approvedByURI != nil {
+ status.ApprovedByURI = approvedByURI.String()
+ }
}
// Assume not pending approval; this may