use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Group;
-use Friendica\Model\Notify\Type;
+use Friendica\Model\Notification;
use Friendica\Model\User;
use Friendica\Protocol\Activity;
use Friendica\Util\Crypto;
if (DBA::isResult($contact)) {
$photo = $contact['photo'];
} else {
- $photo = DI::baseUrl() . '/images/person-300.jpg';
+ $photo = DI::baseUrl() . Contact::DEFAULT_AVATAR_PHOTO;
}
Contact::updateAvatar($dfrn_record, $photo);
if (DBA::isResult($r)) {
$combined = $r[0];
- if ($combined['notify-flags'] & Type::CONFIRM) {
+ if ($combined['notify-flags'] & Notification\Type::CONFIRM) {
$mutual = ($new_relation == Contact::FRIEND);
notification([
- 'type' => Type::CONFIRM,
- 'notify_flags' => $combined['notify-flags'],
- 'language' => $combined['language'],
- 'to_name' => $combined['username'],
- 'to_email' => $combined['email'],
- 'uid' => $combined['uid'],
- 'link' => DI::baseUrl() . '/contact/' . $dfrn_record,
- 'source_name' => ((strlen(stripslashes($combined['name']))) ? stripslashes($combined['name']) : DI::l10n()->t('[Name Withheld]')),
- 'source_link' => $combined['url'],
- 'source_photo' => $combined['photo'],
- 'verb' => ($mutual ? Activity::FRIEND : Activity::FOLLOW),
- 'otype' => 'intro'
+ 'type' => Notification\Type::CONFIRM,
+ 'otype' => Notification\ObjectType::INTRO,
+ 'verb' => ($mutual ? Activity::FRIEND : Activity::FOLLOW),
+ 'uid' => $combined['uid'],
+ 'cid' => $combined['id'],
+ 'link' => DI::baseUrl() . '/contact/' . $dfrn_record,
]);
}
}