forked from GNUsocial/gnu-social
[PLUGIN][WebMonetization] Fix ActivityPub config
This commit is contained in:
parent
184d0246a5
commit
b8a35f9d6d
@ -243,11 +243,11 @@ class WebMonetization extends Plugin
|
||||
public function onActivityPubAddActivityStreamsTwoData(string $type_name, &$type): bool
|
||||
{
|
||||
if ($type_name === 'Person') {
|
||||
$actor = \Plugin\ActivityPub\ActivityPub::getActorByUri($type->getId());
|
||||
$wallet = DB::findOneBy(Wallet::class, ['actor_id' => $actor->getId()], return_null: true);
|
||||
$address = $wallet?->getAddress();
|
||||
if ($address) {
|
||||
$type->set('webmonetizationWallet', $address);
|
||||
$actor = \Plugin\ActivityPub\ActivityPub::getActorByUri($type->getId());
|
||||
$wallet = DB::findOneBy(Wallet::class, ['actor_id' => $actor->getId()], return_null: true);
|
||||
|
||||
if (!\is_null($address = $wallet?->getAddress())) {
|
||||
$type->set('gs:webmonetizationWallet', $address);
|
||||
}
|
||||
}
|
||||
return Event::next;
|
||||
|
Loading…
Reference in New Issue
Block a user