JOINs and FOLLOWs would have null titles in Activity representation of notices
This commit is contained in:
parent
e61e11a973
commit
9018fd75c6
@ -311,9 +311,10 @@ class ActivityPlugin extends Plugin
|
|||||||
// FIXME: do something here
|
// FIXME: do something here
|
||||||
break;
|
break;
|
||||||
case ActivityVerb::JOIN:
|
case ActivityVerb::JOIN:
|
||||||
$mem = Group_member::getKV('uri', $stored->uri);
|
$mem = Group_member::getKV('uri', $stored->getUri());
|
||||||
if (!empty($mem)) {
|
if ($mem instanceof Group_member) {
|
||||||
$group = $mem->getGroup();
|
$group = $mem->getGroup();
|
||||||
|
$act->title = $stored->getTitle();
|
||||||
$act->objects = array(ActivityObject::fromGroup($group));
|
$act->objects = array(ActivityObject::fromGroup($group));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -322,9 +323,10 @@ class ActivityPlugin extends Plugin
|
|||||||
break;
|
break;
|
||||||
case ActivityVerb::FOLLOW:
|
case ActivityVerb::FOLLOW:
|
||||||
$sub = Subscription::getKV('uri', $stored->uri);
|
$sub = Subscription::getKV('uri', $stored->uri);
|
||||||
if (!empty($sub)) {
|
if ($sub instanceof Subscription) {
|
||||||
$profile = Profile::getKV('id', $sub->subscribed);
|
$profile = Profile::getKV('id', $sub->subscribed);
|
||||||
if (!empty($profile)) {
|
if ($profile instanceof Profile) {
|
||||||
|
$act->title = $stored->getTitle();
|
||||||
$act->objects = array($profile->asActivityObject());
|
$act->objects = array($profile->asActivityObject());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user