forked from GNUsocial/gnu-social
[PLUGIN][ActivityPub][Postman] JSON_UNESCAPED_SLASHES
Only record webfinger matches for acct
This commit is contained in:
parent
26a50618b0
commit
b630d530f4
@ -333,6 +333,7 @@ class ActivityPub extends Plugin
|
|||||||
} else {
|
} else {
|
||||||
array_push($delivered, ...$dummy);
|
array_push($delivered, ...$dummy);
|
||||||
foreach ($dummy as $actor) {
|
foreach ($dummy as $actor) {
|
||||||
|
if ($actor->isPerson()) {
|
||||||
FreeNetworkActorProtocol::protocolSucceeded(
|
FreeNetworkActorProtocol::protocolSucceeded(
|
||||||
'activitypub',
|
'activitypub',
|
||||||
$actor,
|
$actor,
|
||||||
@ -340,6 +341,7 @@ class ActivityPub extends Plugin
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Log::error('ActivityPub @ freeNetworkDistribute: ' . $e->getMessage(), [$e]);
|
Log::error('ActivityPub @ freeNetworkDistribute: ' . $e->getMessage(), [$e]);
|
||||||
//$to_failed[$inbox] = $activity;
|
//$to_failed[$inbox] = $activity;
|
||||||
|
@ -121,7 +121,7 @@ abstract class Model
|
|||||||
*
|
*
|
||||||
* @throws ClientException
|
* @throws ClientException
|
||||||
*/
|
*/
|
||||||
public static function toJson(mixed $object, ?int $options = null): string
|
public static function toJson(mixed $object, int $options = \JSON_UNESCAPED_SLASHES): string
|
||||||
{
|
{
|
||||||
switch ($object::class) {
|
switch ($object::class) {
|
||||||
case \App\Entity\Activity::class:
|
case \App\Entity\Activity::class:
|
||||||
|
@ -145,7 +145,7 @@ class Activity extends Model
|
|||||||
*
|
*
|
||||||
* @throws ClientException
|
* @throws ClientException
|
||||||
*/
|
*/
|
||||||
public static function toJson(mixed $object, ?int $options = null): string
|
public static function toJson(mixed $object, int $options = \JSON_UNESCAPED_SLASHES): string
|
||||||
{
|
{
|
||||||
if ($object::class !== GSActivity::class) {
|
if ($object::class !== GSActivity::class) {
|
||||||
throw new InvalidArgumentException('First argument type must be an Activity.');
|
throw new InvalidArgumentException('First argument type must be an Activity.');
|
||||||
|
@ -203,7 +203,7 @@ class Actor extends Model
|
|||||||
*
|
*
|
||||||
* @throws ServerException
|
* @throws ServerException
|
||||||
*/
|
*/
|
||||||
public static function toJson(mixed $object, ?int $options = null): string
|
public static function toJson(mixed $object, int $options = \JSON_UNESCAPED_SLASHES): string
|
||||||
{
|
{
|
||||||
if ($object::class !== GSActor::class) {
|
if ($object::class !== GSActor::class) {
|
||||||
throw new InvalidArgumentException('First argument type must be an Actor.');
|
throw new InvalidArgumentException('First argument type must be an Actor.');
|
||||||
|
@ -337,7 +337,7 @@ class Note extends Model
|
|||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
* @throws ServerException
|
* @throws ServerException
|
||||||
*/
|
*/
|
||||||
public static function toJson(mixed $object, ?int $options = null): string
|
public static function toJson(mixed $object, int $options = \JSON_UNESCAPED_SLASHES): string
|
||||||
{
|
{
|
||||||
if ($object::class !== GSNote::class) {
|
if ($object::class !== GSNote::class) {
|
||||||
throw new InvalidArgumentException('First argument type must be a Note.');
|
throw new InvalidArgumentException('First argument type must be a Note.');
|
||||||
|
Loading…
Reference in New Issue
Block a user