summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-09-05 00:22:37 -0400
committerEvan Prodromou <evan@status.net>2010-09-07 04:00:58 -0400
commite20dc9fec3e77f17cdfbed1dab2c5382d1a82bd2 (patch)
tree71a8946ca9322dcbf9e95abd85d148a6498e5278
parentdf88624d4980dd4cbd21ca8ae19cfb14f17357f4 (diff)
correctly check for local notice to status mappings when notice originated here
-rwxr-xr-xplugins/TwitterBridge/daemons/twitterstatusfetcher.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
index 027e572b0..06c59959a 100755
--- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
+++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
@@ -301,14 +301,18 @@ class TwitterStatusFetcher extends ParallelizingDaemon
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}");
- $replyUri = $this->makeStatusURI($status->in_reply_to_screen_name, $status->in_reply_to_status_id);
- $reply = Notice::staticGet('uri', $replyUri);
- if (empty($reply)) {
+ $n2s = Notice_to_status::staticGet('status_id', $status->in_reply_to_status_id);
+ if (empty($n2s)) {
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;
+ $reply = Notice::staticGet('id', $n2s->notice_id);
+ if (empty($reply)) {
+ 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;
+ }
}
}