Allow PuSH posts without author information
Superfeedr (sp.?) posts entries without author information. We can assume that this is intended to be by the original author. Re-structured the checks for entries that come in by PuSH so they can either have no author or an empty author, but not a different author.
This commit is contained in:
parent
f558508784
commit
25cb917523
|
@ -468,17 +468,16 @@ class Ostatus_profile extends Memcached_DataObject
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Individual user feeds may contain only posts from themselves.
|
$actor = $activity->actor;
|
||||||
// Authorship is validated against the profile URI on upper layers,
|
|
||||||
// through PuSH setup or Salmon signature checks.
|
if (empty($actor)) {
|
||||||
$actorUri = self::getActorProfileURI($activity);
|
// OK here! assume the default
|
||||||
if ($actorUri == $this->uri) {
|
} else if ($actor->id == $this->uri || $actor->link == $this->uri) {
|
||||||
// Check if profile info has changed and update it
|
$this->updateFromActivityObject($actor);
|
||||||
$this->updateFromActivityObject($activity->actor);
|
|
||||||
} else {
|
} else {
|
||||||
common_log(LOG_WARNING, "OStatus: skipping post with bad author: got $actorUri expected $this->uri");
|
throw new Exception("Got an actor '{$actor->title}' ({$actor->id}) on single-user feed for {$this->uri}");
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$oprofile = $this;
|
$oprofile = $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user