[GROUP] Simplify logic by making Actor::Organisation a type of Actor::Group

Some minor bug fixes
This commit is contained in:
2022-02-10 04:31:06 +00:00
parent 35e907f7b2
commit 1f1524c2b3
12 changed files with 106 additions and 402 deletions

View File

@@ -62,15 +62,14 @@ use Plugin\ActivityPub\Util\Model;
class Actor extends Model
{
private static array $_gs_actor_type_to_as2_actor_type = [
GSActor::PERSON => 'Person',
GSActor::GROUP => 'Group',
GSActor::ORGANISATION => 'Organization',
GSActor::BOT => 'Application',
GSActor::PERSON => 'Person',
GSActor::GROUP => 'Group',
GSActor::BOT => 'Application',
];
private static array $_as2_actor_type_to_gs_actor_type = [
'Person' => GSActor::PERSON,
'Group' => GSActor::GROUP,
'Organization' => GSActor::ORGANISATION,
'Organization' => GSActor::GROUP,
'Application' => GSActor::BOT,
'Service' => null,
];