self::blow('reply:stream:%d', $parentauthor->id);
} catch (NoParentNoticeException $e) {
// Not a reply, since it has no parent!
+ } catch (NoResultException $e) {
+ // Parent notice was probably deleted
}
// @todo ideally this parser information would only
$ctx->replyToUrl = $reply->getUrl(true); // true for fallback to local URL, less messy
} catch (NoParentNoticeException $e) {
// This is not a reply to something
+ } catch (NoResultException $e) {
+ // Parent notice was probably deleted
}
try {
$in_reply_to = $parent->id;
} catch (NoParentNoticeException $e) {
$in_reply_to = null;
+ } catch (NoResultException $e) {
+ // the in_reply_to message has probably been deleted
+ $in_reply_to = null;
}
$twitter_status['in_reply_to_status_id'] = $in_reply_to;
protected function formatNotice(Notice $notice)
{
$profile = $notice->getProfile();
+ $nicknames = $profile->getNickname();
try {
$parent = $notice->getParent();
$orig_profile = $parent->getProfile();
- $nicknames = sprintf('%1$s => %2$s', $profile->nickname, $orig_profile->nickname);
+ $nicknames = sprintf('%1$s => %2$s', $profile->getNickname(), $orig_profile->getNickname());
} catch (NoParentNoticeException $e) {
- $nicknames = $profile->nickname;
+ // Not a reply, no parent notice stored
+ } catch (NoResultException $e) {
+ // Parent notice was probably deleted
}
return sprintf('%1$s: %2$s [%3$u]', $nicknames, $notice->content, $notice->id);
}
} catch (NoParentNoticeException $e) {
// It wasn't a reply to anything, so we can't harvest nickname-relations.
+ } catch (NoResultException $e) {
+ // The parent notice was deleted.
}
$matches = common_find_mentions_raw($text);
$xs->text(sprintf(' => %s', $orig_profile->nickname));
} catch (NoParentNoticeException $e) {
$xs->text(": ");
+ } catch (NoResultException $e) {
+ // Parent notice was probably deleted.
+ $xs->text(": ");
}
if (!empty($notice->rendered)) {
$notice->rendered = str_replace("\t", "", $notice->rendered);