summaryrefslogtreecommitdiff
path: root/plugins/OStatus/classes/Ostatus_profile.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus/classes/Ostatus_profile.php')
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index 6beaf0f5d..82dbf773d 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -650,6 +650,7 @@ class Ostatus_profile extends Memcached_DataObject
*/
protected function filterReplies($sender, &$attention_uris)
{
+ common_log(LOG_DEBUG, "Original reply recipients: " . implode(', ', $attention_uris));
$groups = array();
$replies = array();
foreach ($attention_uris as $recipient) {
@@ -668,6 +669,8 @@ class Ostatus_profile extends Memcached_DataObject
// Deliver to local members of this remote group.
// @fixme sender verification?
$groups[] = $oprofile->group_id;
+ } else {
+ common_log(LOG_DEBUG, "Skipping reply to remote profile $recipient");
}
continue;
}
@@ -683,14 +686,24 @@ class Ostatus_profile extends Memcached_DataObject
$group = User_group::staticGet('id', $id);
if ($group) {
// Deliver to all members of this local group if allowed.
- if ($sender->localProfile()->isMember($group)) {
+ $profile = $sender->localProfile();
+ if ($profile->isMember($group)) {
$groups[] = $group->id;
+ } else {
+ common_log(LOG_DEBUG, "Skipping reply to local group $group->nickname as sender $profile->id is not a member");
}
continue;
+ } else {
+ common_log(LOG_DEBUG, "Skipping reply to bogus group $recipient");
}
}
+
+ common_log(LOG_DEBUG, "Skipping reply to unrecognized profile $recipient");
+
}
$attention_uris = $replies;
+ common_log(LOG_DEBUG, "Local reply recipients: " . implode(', ', $replies));
+ common_log(LOG_DEBUG, "Local group recipients: " . implode(', ', $groups));
return $groups;
}