Send objects instead of integers to File_to_post::processNew

This commit is contained in:
Mikael Nordfeldth
2015-06-04 17:36:11 +02:00
parent 5358fb3cce
commit fe6498e7c8
6 changed files with 25 additions and 30 deletions

View File

@@ -691,8 +691,8 @@ class Ostatus_profile extends Managed_DataObject
$options);
if ($saved instanceof Notice) {
Ostatus_source::saveNew($saved, $this, $method);
if (!empty($attachment)) {
File_to_post::processNew($attachment->id, $saved->id);
if ($attachment instanceof File) {
File_to_post::processNew($attachment, $saved);
}
}
} catch (Exception $e) {