Check for existence of a public contact id before deleting related notifications in Model\Contact

- Address part of https://github.com/friendica/friendica/issues/11993#issuecomment-1338134893
This commit is contained in:
Hypolite Petovan 2022-12-08 09:41:08 -05:00
parent e78471c847
commit a71fb8d7f3

View File

@ -3209,8 +3209,9 @@ class Contact
self::clearFollowerFollowingEndpointCache($contact['uid']); self::clearFollowerFollowingEndpointCache($contact['uid']);
$cdata = self::getPublicAndUserContactID($contact['id'], $contact['uid']); $cdata = self::getPublicAndUserContactID($contact['id'], $contact['uid']);
if (!empty($cdata['public'])) {
DI::notification()->deleteForUserByVerb($contact['uid'], Activity::FOLLOW, ['actor-id' => $cdata['public']]); DI::notification()->deleteForUserByVerb($contact['uid'], Activity::FOLLOW, ['actor-id' => $cdata['public']]);
}
} }
/** /**