diff options
author | Zach Copley <zach@status.net> | 2010-11-16 02:32:46 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-11-16 02:32:46 +0000 |
commit | bd566b6f855a19efb1d74eeaa39ab4e621903b12 (patch) | |
tree | befc30688421cc1fc99b1aef7e64d45f08614cd2 /plugins/TwitterBridge/twitterimport.php | |
parent | ca4c0a160122d20f95877102f9712aee45c7afb8 (diff) | |
parent | eb0495d10719f2be86f8f97e82aaa1b8bf923c7d (diff) |
Merge branch '0.9.x' into facebook-upgrade
Diffstat (limited to 'plugins/TwitterBridge/twitterimport.php')
-rw-r--r-- | plugins/TwitterBridge/twitterimport.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/TwitterBridge/twitterimport.php b/plugins/TwitterBridge/twitterimport.php index 07a9cf95f..498e9b1fc 100644 --- a/plugins/TwitterBridge/twitterimport.php +++ b/plugins/TwitterBridge/twitterimport.php @@ -189,6 +189,7 @@ class TwitterImport Notice_to_status::saveNew($notice->id, $status->id); $this->saveStatusMentions($notice, $status); + $this->saveStatusAttachments($notice, $status); $notice->blowOnInsert(); @@ -648,4 +649,20 @@ class TwitterImport } } } + + /** + * Record URL links from the notice. Needed to get thumbnail records + * for referenced photo and video posts, etc. + * + * @param Notice $notice + * @param object $status + */ + function saveStatusAttachments($notice, $status) + { + if (!empty($status->entities) && !empty($status->entities->urls)) { + foreach ($status->entities->urls as $url) { + File::processNew($url->url, $notice->id); + } + } + } }
\ No newline at end of file |