<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
);
while ($notification = $this->dba->fetch($stmtNotifications)) {
- // There are two kind of introduction. Contacts suggested by other contacts and normal connection requests.
+ if (empty($notification['url'])) {
+ continue;
+ }
+
+ // There are two kind of introduction. Contacts suggested by other contacts and normal connection requests.
// We have to distinguish between these two because they use different data.
// Contact suggestions
if ($notification['fid'] ?? '') {
+ if (empty($notification['furl'])) {
+ continue;
+ }
$return_addr = bin2hex($this->nick . '@' .
$this->baseUrl->getHostName() .
(($this->baseUrl->getURLPath()) ? '/' . $this->baseUrl->getURLPath() : ''));
'madeby_zrl' => Contact::magicLink($notification['url']),
'madeby_addr' => $notification['addr'],
'contact_id' => $notification['contact-id'],
- 'photo' => (!empty($notification['fphoto']) ? Proxy::proxifyUrl($notification['fphoto'], false, Proxy::SIZE_SMALL) : "images/person-300.jpg"),
+ 'photo' => (!empty($notification['fphoto']) ? Proxy::proxifyUrl($notification['fphoto'], false, Proxy::SIZE_SMALL) : Contact::DEFAULT_AVATAR_PHOTO),
'name' => $notification['fname'],
'url' => $notification['furl'],
'zrl' => Contact::magicLink($notification['furl']),
// Normal connection requests
} else {
- if (empty($notification['url'])) {
- continue;
- }
-
// Don't show these data until you are connected. Diaspora is doing the same.
if ($notification['network'] === Protocol::DIASPORA) {
$notification['location'] = "";