]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Possible fix for https://bugz.foocorp.net/T41
authorRoland Haeder <roland@mxchange.org>
Fri, 12 Sep 2014 16:48:59 +0000 (18:48 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 29 Mar 2020 22:20:16 +0000 (00:20 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
lib/activityimporter.php

index 68b5873b0bf316ae66d5e0ee39d0c9a409ed4b7c..b3750539400fb305b533449c90682c03b915413c 100644 (file)
@@ -306,7 +306,7 @@ class ActivityImporter extends QueueHandler
             // Is the recipient a remote group?
             $oprofile = Ostatus_profile::ensureProfileURI($recipient);
 
-            if ($oprofile) {
+            if ($oprofile instanceof Ostatus_profile) {
                 if (!$oprofile->isGroup()) {
                     // may be canonicalized or something
                     $replies[] = $oprofile->uri;
@@ -321,10 +321,11 @@ class ActivityImporter extends QueueHandler
 
             if ($id) {
                 $group = User_group::getKV('id', $id);
-                if ($group) {
+                if ($group instanceof User_group) {
                     // Deliver to all members of this local group if allowed.
-                    $profile = $sender->localProfile();
-                    if ($profile->isMember($group)) {
+                    $profile = Profile::getKV('id', $recipient);
+
+                    if (($profile instanceof Profile) && ($profile->isMember($group))) {
                         $groups[] = $group->id;
                     } else {
                         common_log(LOG_INFO, "Skipping reply to local group {$group->nickname} as sender {$profile->id} is not a member");