*/
public function localProfile()
{
+ if ($this->isGroup()) {
+ return $this->localGroup()->getProfile();
+ }
+
$profile = Profile::getKV('id', $this->profile_id);
if ($profile instanceof Profile) {
return $profile;
{
$notice = null;
- $profile = $this->checkAuthorship($activity, $this->localProfile());
+ $profile = ActivityUtils::checkAuthorship($activity, $this->localProfile());
// It's not always an ActivityObject::NOTE, but... let's just say it is.
$options['reply_to'] = $orig->id;
}
}
+ if (!empty($activity->context->conversation)) {
+ // we store the URI here, Notice class can look it up later
+ $options['conversation'] = $activity->context->conversation;
+ }
$location = $activity->context->location;
if ($location) {
}
// Try looking it up
- $oprofile = Ostatus_profile::getKV('uri', 'acct:'.$addr);
+ $oprofile = Ostatus_profile::getKV('uri', Discovery::normalize($addr));
if ($oprofile instanceof Ostatus_profile) {
self::cacheSet(sprintf('ostatus_profile:webfinger:%s', $addr), $oprofile->getUri());
common_log(LOG_WARNING,
"OStatus: skipping post with group listed ".
"as author: " . $oprofile->getUri() . " in feed from " . $this->getUri());
- return false;
+ throw new ServerException('Activity author is a non-actor');
}
} else {
$actor = $activity->actor;