move signing to take a local actor profile and use local keys

This commit is contained in:
James Walker
2010-02-26 14:21:21 -05:00
parent 3a7eef1074
commit 223ebc765c
7 changed files with 38 additions and 32 deletions

View File

@@ -357,7 +357,7 @@ class Ostatus_profile extends Memcached_DataObject
common_log(LOG_INFO, "Posting to Salmon endpoint $this->salmonuri: $xml");
$salmon = new Salmon(); // ?
return $salmon->post($this->salmonuri, $xml);
return $salmon->post($this->salmonuri, $xml, $actor);
}
return false;
}
@@ -369,11 +369,11 @@ class Ostatus_profile extends Memcached_DataObject
* @param mixed $entry XML string, Notice, or Activity
* @return boolean success
*/
public function notifyActivity($entry)
public function notifyActivity($entry, $actor)
{
if ($this->salmonuri) {
$salmon = new Salmon();
return $salmon->post($this->salmonuri, $this->notifyPrepXml($entry));
return $salmon->post($this->salmonuri, $this->notifyPrepXml($entry), $actor);
}
return false;
@@ -386,11 +386,12 @@ class Ostatus_profile extends Memcached_DataObject
* @param mixed $entry XML string, Notice, or Activity
* @return boolean success
*/
public function notifyDeferred($entry)
public function notifyDeferred($entry, $actor)
{
if ($this->salmonuri) {
$data = array('salmonuri' => $this->salmonuri,
'entry' => $this->notifyPrepXml($entry));
'entry' => $this->notifyPrepXml($entry),
'actor' => $actor->id);
$qm = QueueManager::get();
return $qm->enqueue($data, 'salmon');