From cd1f2e25f57342bff34b5b0c2ab26ec25adf343f Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 12 Sep 2014 18:48:59 +0200 Subject: [PATCH] Possible fix for https://bugz.foocorp.net/T41 Signed-off-by: Roland Haeder --- lib/activityimporter.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/activityimporter.php b/lib/activityimporter.php index 4e13419ae7..2cf9501830 100644 --- a/lib/activityimporter.php +++ b/lib/activityimporter.php @@ -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"); -- 2.39.2