We need to look up a feed profile for HandleFeedEntryWithProfile events,
regardless of whether they're an OStatus user, group, or something else;
this is the least hairy way of doing that--the alternative being
to keep spreading the same logic all over the calling code.
Theoretically, this change might allow OStatusGroups to be recorded
as the authors of activities if they pass through any authorless
activities; but that's why we have checkAuthorship().
*/
public function localProfile()
{
+ if ($this->isGroup()) {
+ return $this->localGroup()->getProfile();
+ }
+
$profile = Profile::getKV('id', $this->profile_id);
if ($profile instanceof Profile) {
return $profile;