]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityobject.php
getAcctUri function added with related exception
[quix0rs-gnu-social.git] / lib / activityobject.php
index c09a5ed8dd912474cdbebe48696aeda44b47282c..5a20ab2c18d35965d9d307f1b21ce2d3137b79a3 100644 (file)
@@ -438,8 +438,12 @@ class ActivityObject
             $object->type    = (empty($notice->object_type)) ? ActivityObject::NOTE : $notice->object_type;
 
             $object->id      = $notice->uri;
-            $object->title   = 'New ' . ActivityObject::canonicalType($notice->object_type)
-                                . ' by ' . $notice->getProfile()->nickname;
+            $object->title = 'New ' . ActivityObject::canonicalType($object->type) . ' by ';
+            try {
+                $object->title .= $notice->getProfile()->getAcctUri();
+            } catch (ProfileNoAcctUriException $e) {
+                $object->title .= $e->profile->nickname;
+            }
             $object->content = $notice->rendered;
             $object->link    = $notice->bestUrl();