[ActivityPub] Ensuring notice distribution

ActivityPubPlugin:
- Fix of accepted activity verbs to include SHARES
- Add attention profiles to delivery when announcing

Activitypub_notice:
- New local function to retrieve original URL
- Removal of unnecessary 'Atom*' attributes
- Small fix to the ensuring of actor profile

Activitypub_profile:
- New local function to fetch AP profiles from a collection

Activitypub_postman:
- Fix url passed in the announce activity
This commit is contained in:
brunoccast
2019-07-17 16:25:24 +01:00
committed by Diogo Cordeiro
parent 94a4059b4a
commit 1b356d3bf2
4 changed files with 66 additions and 32 deletions

View File

@@ -229,6 +229,20 @@ class Activitypub_profile extends Managed_DataObject
return $aprofile;
}
public static function from_profile_collection(array $profiles): array {
$ap_profiles = [];
foreach ($profiles as $profile) {
try {
$ap_profiles[] = self::from_profile($profile);
} catch (Exception $e) {
// Don't mind local profiles
}
}
return $ap_profiles;
}
/**
* Given an existent local profile creates an ActivityPub profile.
* One must be careful not to give a user profile to this function