Merge branch 'dev' of ../p3 into dev

This commit is contained in:
nobody 2020-11-16 16:53:04 -08:00
commit 9778c20cec
2 changed files with 7 additions and 3 deletions

View file

@ -276,7 +276,7 @@ class ActivityPub {
$x['deliveries'] = $qi; $x['deliveries'] = $qi;
} }
if ($join_msg) { if ($join_msg) {
$qi = self::queue_message($join_msg,$x['sender'],$h[0]); $qi = self::queue_message($jmsg2,$x['sender'],$h[0]);
if ($qi) { if ($qi) {
$x['deliveries'] = $qi; $x['deliveries'] = $qi;
} }

View file

@ -271,7 +271,8 @@ class Inbox extends Controller {
case 'Accept': case 'Accept':
// Activitypub for wordpress sends lowercase 'follow' on accept. // Activitypub for wordpress sends lowercase 'follow' on accept.
// https://github.com/pfefferle/wordpress-activitypub/issues/97 // https://github.com/pfefferle/wordpress-activitypub/issues/97
if (is_array($AS->obj) && array_key_exists('type', $AS->obj) && in_array($AS->obj['type'], ['Follow','follow'])) { // Mobilizon sends Accept/"Member" (not in vocabulary) in response to Join/Group
if (is_array($AS->obj) && array_key_exists('type', $AS->obj) && in_array($AS->obj['type'], ['Follow','follow', 'Member'])) {
// do follow activity // do follow activity
Activity::follow($channel,$AS); Activity::follow($channel,$AS);
} }
@ -297,11 +298,14 @@ class Inbox extends Controller {
Activity::actor_store($AS->obj['id'],$AS->obj); Activity::actor_store($AS->obj['id'],$AS->obj);
break; break;
} }
case 'Accept':
if (is_array($AS->obj) && array_key_exists('type',$AS->obj) && (ActivityStreams::is_an_actor($AS->obj['type']) || $AS->obj['type'] === 'Member')) {
break;
}
case 'Create': case 'Create':
case 'Like': case 'Like':
case 'Dislike': case 'Dislike':
case 'Announce': case 'Announce':
case 'Accept':
case 'Reject': case 'Reject':
case 'TentativeAccept': case 'TentativeAccept':
case 'TentativeReject': case 'TentativeReject':