Added notifications for follow requests

This commit is contained in:
Michael 2021-06-01 21:13:16 +00:00
parent 675dbbf9c0
commit 842cbbaf09
4 changed files with 60 additions and 15 deletions

View file

@ -2536,6 +2536,8 @@ class Contact
// Ensure to always have the correct network type, independent from the connection request method
self::updateFromProbe($contact['id']);
Post\UserNotification::insertNotication($contact['id'], Verb::getID(Activity::FOLLOW), $importer['uid']);
return true;
} else {
// send email notification to owner?
@ -2567,6 +2569,8 @@ class Contact
self::updateAvatar($contact_id, $photo, true);
Post\UserNotification::insertNotication($contact_id, Verb::getID(Activity::FOLLOW), $importer['uid']);
$contact_record = DBA::selectFirst('contact', ['id', 'network', 'name', 'url', 'photo'], ['id' => $contact_id]);
/// @TODO Encapsulate this into a function/method