Notice_to_status::saveNew($notice->id, $status->id);
$this->saveStatusMentions($notice, $status);
+ $this->saveStatusAttachments($notice, $status);
$notice->blowOnInsert();
}
}
}
+
+ /**
+ * 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