// TRANS: Client error displayed when referring to a non-existing user.
$this->clientError(_m('No such user.'));
}
// TRANS: Client error displayed when referring to a non-existing user.
$this->clientError(_m('No such user.'));
}
($notice->profile_id == $this->user->id ||
array_key_exists($this->user->id, $notice->getReplies())))
{
($notice->profile_id == $this->user->id ||
array_key_exists($this->user->id, $notice->getReplies())))
{
$existing = Notice::getKV('uri', $this->activity->objects[0]->id);
if ($existing instanceof Notice) {
$existing = Notice::getKV('uri', $this->activity->objects[0]->id);
if ($existing instanceof Notice) {
common_log(LOG_INFO, sprintf('Setting up subscription from remote %s to local %s', $oprofile->getUri(), $this->user->getNickname()));
Subscription::start($oprofile->localProfile(),
$this->user->getProfile());
common_log(LOG_INFO, sprintf('Setting up subscription from remote %s to local %s', $oprofile->getUri(), $this->user->getNickname()));
Subscription::start($oprofile->localProfile(),
$this->user->getProfile());
common_log(LOG_INFO, sprintf('Canceling subscription from remote %s to local %s', $oprofile->getUri(), $this->user->getNickname()));
Subscription::cancel($oprofile->localProfile(), $this->user->getProfile());
} else {
common_log(LOG_INFO, sprintf('Canceling subscription from remote %s to local %s', $oprofile->getUri(), $this->user->getNickname()));
Subscription::cancel($oprofile->localProfile(), $this->user->getProfile());
} else {
$old = Fave::pkeyGet(array('user_id' => $profile->id,
'notice_id' => $notice->id));
$old = Fave::pkeyGet(array('user_id' => $profile->id,
'notice_id' => $notice->id));
$fave = Fave::pkeyGet(array('user_id' => $profile->id,
'notice_id' => $notice->id));
$fave = Fave::pkeyGet(array('user_id' => $profile->id,
'notice_id' => $notice->id));
if ($this->activity->objects[0]->type != ActivityObject::PERSON) {
// TRANS: Client exception.
throw new ClientException(_m('Not a person object.'));
if ($this->activity->objects[0]->type != ActivityObject::PERSON) {
// TRANS: Client exception.
throw new ClientException(_m('Not a person object.'));
// TRANS: Client exception. %s is an object ID.
throw new ClientException(sprintf(_m('Notice with ID %s unknown.'),$object->id));
}
// TRANS: Client exception. %s is an object ID.
throw new ClientException(sprintf(_m('Notice with ID %s unknown.'),$object->id));
}