protected $oprofile = null; // Ostatus_profile of the actor
protected $actor = null; // Profile object of the actor
+ var $format = 'text'; // error messages will be printed in plaintext
+
var $xml = null;
var $activity = null;
var $target = null;
if (!isset($_SERVER['CONTENT_TYPE'])) {
// TRANS: Client error. Do not translate "Content-type"
- $this->clientError(_m('Salmon requires a Content-type header.'));
+ throw new ClientException(_m('Salmon requires a Content-type header.'));
}
$envxml = null;
switch ($_SERVER['CONTENT_TYPE']) {
// Cryptographic verification test, throws exception on failure
$magic_env->verify($this->actor);
+ common_debug('Salmon slap is carrying activity URI=='._ve($this->activity->id));
+
return true;
}
assert($this->target instanceof Profile);
common_log(LOG_DEBUG, "Got a " . $this->activity->verb);
+
try {
$options = [ 'source' => 'ostatus' ];
common_debug('Save salmon slap directly with Notice::saveActivity for actor=='.$this->actor->getID());
// duplicate? Maybe someone's database is out of sync?
// Let's just accept it and move on.
common_log(LOG_INFO, 'Salmon slap carried an event which had already been fulfilled.');
+ return true;
} catch (NoticeSaveException $e) {
common_debug('Notice::saveActivity did not save our '._ve($this->activity->verb).' activity, trying old-fashioned salmon saving.');
}