Merge branch '1.0.x' of git+ssh://statusnetdev.net/var/www/evan into 1.0.x
This commit is contained in:
commit
9f8d0b36a8
@ -125,11 +125,18 @@ class OStatusPlugin extends Plugin
|
|||||||
*/
|
*/
|
||||||
function onStartEnqueueNotice($notice, &$transports)
|
function onStartEnqueueNotice($notice, &$transports)
|
||||||
{
|
{
|
||||||
// FIXME: we don't do privacy-controlled OStatus updates yet.
|
if ($notice->isLocal()) {
|
||||||
// once that happens, finer grain of control here.
|
if ($notice->inScope(null)) {
|
||||||
if ($notice->isLocal() && $notice->inScope(null)) {
|
// put our transport first, in case there's any conflict (like OMB)
|
||||||
// put our transport first, in case there's any conflict (like OMB)
|
array_unshift($transports, 'ostatus');
|
||||||
array_unshift($transports, 'ostatus');
|
$this->log(LOG_INFO, "Notice {$notice->id} queued for OStatus processing");
|
||||||
|
} else {
|
||||||
|
// FIXME: we don't do privacy-controlled OStatus updates yet.
|
||||||
|
// once that happens, finer grain of control here.
|
||||||
|
$this->log(LOG_NOTICE, "Not queueing notice {$notice->id} for OStatus because of privacy; scope = {$notice->scope}");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$this->log(LOG_NOTICE, "Not queueing notice {$notice->id} for OStatus because it's not local.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ class OStatusQueueHandler extends QueueHandler
|
|||||||
assert($notice instanceof Notice);
|
assert($notice instanceof Notice);
|
||||||
|
|
||||||
$this->notice = $notice;
|
$this->notice = $notice;
|
||||||
$this->user = User::staticGet($notice->profile_id);
|
$this->user = User::staticGet('id', $notice->profile_id);
|
||||||
|
|
||||||
$this->pushUser();
|
$this->pushUser();
|
||||||
|
|
||||||
@ -64,6 +64,13 @@ class OStatusQueueHandler extends QueueHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($notice->getReplies() as $profile_id) {
|
||||||
|
$oprofile = Ostatus_profile::staticGet('profile_id', $profile_id);
|
||||||
|
if ($oprofile) {
|
||||||
|
$this->pingReply($oprofile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($this->notice->reply_to)) {
|
if (!empty($this->notice->reply_to)) {
|
||||||
$replyTo = Notice::staticGet('id', $this->notice->reply_to);
|
$replyTo = Notice::staticGet('id', $this->notice->reply_to);
|
||||||
if (!empty($replyTo)) {
|
if (!empty($replyTo)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user