]> git.mxchange.org Git - friendica.git/blobdiff - mod/ping.php
Merge pull request #10800 from MrPetovan/task/10739-block
[friendica.git] / mod / ping.php
index 61a12a0128ef2e98fe3f772f5ec3b6e71cbde71e..69aef1bf3fd54bda79b04c9c8213e7e54e8d1c74 100644 (file)
@@ -193,7 +193,7 @@ function ping_init(App $a)
                $intro_count = count($intros1) + count($intros2);
                $intros = $intros1 + $intros2;
 
-               $myurl = DI::baseUrl() . '/profile/' . $a->getNickname();
+               $myurl = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname();
                $mails = q(
                        "SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail`
                        WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
@@ -459,13 +459,13 @@ function ping_get_notifications($uid)
 
                        if ($notification["visible"]
                                && !$notification["deleted"]
-                               && empty($result[$notification['parent']])
+                               && empty($result['p:' . $notification['parent']])
                        ) {
                                // Should we condense the notifications or show them all?
-                               if (DI::pConfig()->get(local_user(), 'system', 'detailed_notif')) {
-                                       $result[$notification["id"]] = $notification;
+                               if (($notification['verb'] != Activity::POST) || DI::pConfig()->get(local_user(), 'system', 'detailed_notif')) {
+                                       $result[] = $notification;
                                } else {
-                                       $result[$notification['parent']] = $notification;
+                                       $result['p:' . $notification['parent']] = $notification;
                                }
                        }
                }