setting in_reply_to_profileurl with exception handling

This commit is contained in:
Mikael Nordfeldth 2015-06-12 16:56:25 +02:00
parent 8443b37035
commit 18877f77f0

View File

@ -462,13 +462,11 @@ class QvitterPlugin extends Plugin {
} }
// reply-to profile url // reply-to profile url
$twitter_status['in_reply_to_profileurl'] = null; try {
if ($notice->reply_to) { $reply = $notice->getParent();
$reply = Notice::getKV(intval($notice->reply_to)); $twitter_status['in_reply_to_profileurl'] = $reply->getProfile()->getUrl();
if ($reply) { } catch (ServerException $e) {
$replier_profile = $reply->getProfile(); $twitter_status['in_reply_to_profileurl'] = null;
$twitter_status['in_reply_to_profileurl'] = $replier_profile->profileurl;
}
} }