forked from GNUsocial/gnu-social
[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:
committed by
Diogo Cordeiro
parent
94a4059b4a
commit
1b356d3bf2
@@ -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
|
||||
|
Reference in New Issue
Block a user