[PLUGIN][ActivityPub][FreeNetwork] DB::findBy won't work if not commited first
This commit is contained in:
parent
8b0e9c7890
commit
1e310aa124
@ -382,7 +382,7 @@ class ActivityPub extends Plugin
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (FreeNetworkActorProtocol::canIAddr('activitypub', $addr = Discovery::normalize($target))) {
|
if (FreeNetworkActorProtocol::canIAddr('activitypub', $addr = Discovery::normalize($target))) {
|
||||||
$ap_actor = ActivitypubActor::getByAddr($addr);
|
$ap_actor = DB::wrapInTransaction(fn() => ActivitypubActor::getByAddr($addr));
|
||||||
$actor = Actor::getById($ap_actor->getActorId());
|
$actor = Actor::getById($ap_actor->getActorId());
|
||||||
FreeNetworkActorProtocol::protocolSucceeded('activitypub', $actor->getId(), $addr);
|
FreeNetworkActorProtocol::protocolSucceeded('activitypub', $actor->getId(), $addr);
|
||||||
return Event::stop;
|
return Event::stop;
|
||||||
@ -390,7 +390,7 @@ class ActivityPub extends Plugin
|
|||||||
return Event::next;
|
return Event::next;
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Log::error('ActivityPub Webfinger Mention check failed.', [$e]);
|
Log::error('ActivityPub WebFinger Mention check failed.', [$e]);
|
||||||
return Event::next;
|
return Event::next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user