summaryrefslogtreecommitdiff
path: root/plugins/OStatus/classes/Ostatus_profile.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-24 02:19:13 +0000
committerBrion Vibber <brion@pobox.com>2010-02-24 02:20:31 +0000
commit2e58802cc9959763f28e2f43c8e0cd0dbe7bcd8e (patch)
tree0849a577eda6ffa3491a7b80f5573ddddd0b9462 /plugins/OStatus/classes/Ostatus_profile.php
parent868ae8e62ba2f4c320080213c6cf1d3221240c73 (diff)
OStatus: fix group delivery, send reply/group Salmon pings from background.
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;
}