Fix some Inbox Create Bugs
This commit is contained in:
parent
8b860d6da2
commit
12e5dc4b59
@ -97,9 +97,7 @@ class apActorInboxAction extends ManagedAction
|
|||||||
'as:Public'
|
'as:Public'
|
||||||
];
|
];
|
||||||
|
|
||||||
$to_profiles = [ActivityPubPlugin::actor_uri($profile),
|
$to_profiles = [$profile];
|
||||||
'https://www.w3.org/ns/activitystreams#Public'
|
|
||||||
];
|
|
||||||
|
|
||||||
// Process request
|
// Process request
|
||||||
switch ($data->type) {
|
switch ($data->type) {
|
||||||
|
@ -76,14 +76,10 @@ if (isset($data->object->inReplyTo)) {
|
|||||||
|
|
||||||
$discovery = new Activitypub_explorer;
|
$discovery = new Activitypub_explorer;
|
||||||
|
|
||||||
if ($to_profiles == ['https://www.w3.org/ns/activitystreams#Public']) {
|
|
||||||
$to_profiles = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate Cc objects
|
// Generate Cc objects
|
||||||
if (isset($data->object->cc) && is_array($data->object->cc)) {
|
if (isset($data->object->cc) && is_array($data->object->cc)) {
|
||||||
// Remove duplicates from Cc actors set
|
// Remove duplicates from Cc actors set
|
||||||
array_unique($data->object->to);
|
array_unique($data->object->cc);
|
||||||
foreach ($data->object->cc as $cc_url) {
|
foreach ($data->object->cc as $cc_url) {
|
||||||
try {
|
try {
|
||||||
$to_profiles = array_merge($to_profiles, $discovery->lookup($cc_url));
|
$to_profiles = array_merge($to_profiles, $discovery->lookup($cc_url));
|
||||||
|
Reference in New Issue
Block a user