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

Commit a5d87076 authored by mattl's avatar mattl

Use getParent instead of manual reply_to lookup

parent fcba540a
......@@ -1552,12 +1552,12 @@ class Notice extends Managed_DataObject
$ctx = new ActivityContext();
if (!empty($this->reply_to)) {
$reply = Notice::getKV('id', $this->reply_to);
if (!empty($reply)) {
$ctx->replyToID = $reply->uri;
$ctx->replyToUrl = $reply->bestUrl();
try {
$reply = $this->getParent();
$ctx->replyToID = $reply->uri;
$ctx->replyToUrl = $reply->bestUrl();
} catch (Exception $e) {
// This is not a reply to something
$ctx->location = $this->getLocation();
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