forked from GNUsocial/gnu-social
[PLUGIN][DeleteNote] Support ActivityPub
This commit is contained in:
@@ -143,7 +143,7 @@ class Activity extends Model
|
||||
*/
|
||||
public static function toJson(mixed $object, ?int $options = null): string
|
||||
{
|
||||
if ($object::class !== 'App\Entity\Activity') {
|
||||
if ($object::class !== GSActivity::class) {
|
||||
throw new InvalidArgumentException('First argument type is Activity');
|
||||
}
|
||||
|
||||
|
@@ -171,7 +171,7 @@ class Actor extends Model
|
||||
*/
|
||||
public static function toJson(mixed $object, ?int $options = null): string
|
||||
{
|
||||
if ($object::class !== 'App\Entity\Actor') {
|
||||
if ($object::class !== GSActor::class) {
|
||||
throw new InvalidArgumentException('First argument type is Actor');
|
||||
}
|
||||
$rsa = ActivitypubRsa::getByActor($object);
|
||||
|
@@ -307,7 +307,7 @@ class Note extends Model
|
||||
*/
|
||||
public static function toJson(mixed $object, ?int $options = null): string
|
||||
{
|
||||
if ($object::class !== 'App\Entity\Note') {
|
||||
if ($object::class !== GSNote::class) {
|
||||
throw new InvalidArgumentException('First argument type is Note');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user