forked from GNUsocial/gnu-social
correctly check for local notice to status mappings when notice originated here
This commit is contained in:
parent
9d52d5b4f7
commit
1fbc8adf47
@ -301,14 +301,18 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
|||||||
|
|
||||||
if (!empty($status->in_reply_to_status_id)) {
|
if (!empty($status->in_reply_to_status_id)) {
|
||||||
common_log(LOG_INFO, "Status {$status->id} is a reply to status {$status->in_reply_to_status_id}");
|
common_log(LOG_INFO, "Status {$status->id} is a reply to status {$status->in_reply_to_status_id}");
|
||||||
$replyUri = $this->makeStatusURI($status->in_reply_to_screen_name, $status->in_reply_to_status_id);
|
$n2s = Notice_to_status::staticGet('status_id', $status->in_reply_to_status_id);
|
||||||
$reply = Notice::staticGet('uri', $replyUri);
|
if (empty($n2s)) {
|
||||||
if (empty($reply)) {
|
|
||||||
common_log(LOG_INFO, "Couldn't find local notice for status {$status->in_reply_to_status_id}");
|
common_log(LOG_INFO, "Couldn't find local notice for status {$status->in_reply_to_status_id}");
|
||||||
} else {
|
} else {
|
||||||
common_log(LOG_INFO, "Found local notice {$reply->id} for status {$status->in_reply_to_status_id}");
|
$reply = Notice::staticGet('id', $n2s->notice_id);
|
||||||
$notice->reply_to = $reply->id;
|
if (empty($reply)) {
|
||||||
$notice->conversation = $reply->conversation;
|
common_log(LOG_INFO, "Couldn't find local notice for status {$status->in_reply_to_status_id}");
|
||||||
|
} else {
|
||||||
|
common_log(LOG_INFO, "Found local notice {$reply->id} for status {$status->in_reply_to_status_id}");
|
||||||
|
$notice->reply_to = $reply->id;
|
||||||
|
$notice->conversation = $reply->conversation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user