fallback to local URL if reply->getUrl() is missing

Remote Activity notices generally don't have a proper HTTP URL associated.
This commit is contained in:
Mikael Nordfeldth 2015-06-02 13:55:13 +02:00
parent 0726dcd06c
commit 7e388e697d

View File

@ -1851,7 +1851,7 @@ class Notice extends Managed_DataObject
try { try {
$reply = $this->getParent(); $reply = $this->getParent();
$ctx->replyToID = $reply->getUri(); $ctx->replyToID = $reply->getUri();
$ctx->replyToUrl = $reply->getUrl(); $ctx->replyToUrl = $reply->getUrl(true); // true for fallback to local URL, less messy
} catch (NoParentNoticeException $e) { } catch (NoParentNoticeException $e) {
// This is not a reply to something // This is not a reply to something
} }