parse funkwhale / bandwagon album as statusable

This commit is contained in:
tobi 2025-03-23 16:27:10 +01:00
commit c1fd23438d
8 changed files with 171 additions and 43 deletions

View file

@ -1078,7 +1078,14 @@ func ExtractInteractionPolicy(
statusable Statusable,
owner *gtsmodel.Account,
) *gtsmodel.InteractionPolicy {
policyProp := statusable.GetGoToSocialInteractionPolicy()
ipa, ok := statusable.(InteractionPolicyAware)
if !ok {
// Not a type with interaction
// policy properties settable.
return nil
}
policyProp := ipa.GetGoToSocialInteractionPolicy()
if policyProp == nil || policyProp.Len() != 1 {
return nil
}