[PLUGIN][WebMonetization] Fix ActivityPub config

This commit is contained in:
Phablulo Joel 2022-01-16 22:00:59 -03:00 committed by Hugo Sales
parent 184d0246a5
commit b8a35f9d6d
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -245,9 +245,9 @@ class WebMonetization extends Plugin
if ($type_name === 'Person') { if ($type_name === 'Person') {
$actor = \Plugin\ActivityPub\ActivityPub::getActorByUri($type->getId()); $actor = \Plugin\ActivityPub\ActivityPub::getActorByUri($type->getId());
$wallet = DB::findOneBy(Wallet::class, ['actor_id' => $actor->getId()], return_null: true); $wallet = DB::findOneBy(Wallet::class, ['actor_id' => $actor->getId()], return_null: true);
$address = $wallet?->getAddress();
if ($address) { if (!\is_null($address = $wallet?->getAddress())) {
$type->set('webmonetizationWallet', $address); $type->set('gs:webmonetizationWallet', $address);
} }
} }
return Event::next; return Event::next;