Reduce the amount of "UpdateContact" worker calls

This commit is contained in:
Michael
2022-12-28 14:56:12 +00:00
parent 4bb0fdc9a9
commit e0e2e45b91
6 changed files with 89 additions and 18 deletions

View File

@@ -534,7 +534,7 @@ class Diaspora
if (is_null($fields)) {
$private = true;
if (!($fields = self::validPosting($msg))) {
Logger::warning('Invalid posting', ['msg' => $msg]);
Logger::notice('Invalid posting', ['msg' => $msg]);
return false;
}
} else {
@@ -812,6 +812,7 @@ class Diaspora
*/
private static function contactByHandle(int $uid, WebFingerUri $uri): array
{
Contact::updateByUrlIfNeeded($uri->getAddr());
return Contact::getByURL($uri->getAddr(), null, [], $uid);
}