We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 9018fd75 authored by mattl's avatar mattl

JOINs and FOLLOWs would have null titles in Activity representation of notices

parent e61e11a9
......@@ -311,9 +311,10 @@ class ActivityPlugin extends Plugin
// FIXME: do something here
break;
case ActivityVerb::JOIN:
$mem = Group_member::getKV('uri', $stored->uri);
if (!empty($mem)) {
$mem = Group_member::getKV('uri', $stored->getUri());
if ($mem instanceof Group_member) {
$group = $mem->getGroup();
$act->title = $stored->getTitle();
$act->objects = array(ActivityObject::fromGroup($group));
}
break;
......@@ -322,9 +323,10 @@ class ActivityPlugin extends Plugin
break;
case ActivityVerb::FOLLOW:
$sub = Subscription::getKV('uri', $stored->uri);
if (!empty($sub)) {
if ($sub instanceof Subscription) {
$profile = Profile::getKV('id', $sub->subscribed);
if (!empty($profile)) {
if ($profile instanceof Profile) {
$act->title = $stored->getTitle();
$act->objects = array($profile->asActivityObject());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment