mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:10:11 +00:00
API: photos are now directly stored as attached data and not in the body anymore
This commit is contained in:
parent
60f0af3daa
commit
4b12c54345
6 changed files with 89 additions and 54 deletions
|
@ -112,6 +112,10 @@ class Delayed
|
|||
*/
|
||||
public static function publish(array $item, int $notify = 0, array $taglist = [], array $attachments = [], bool $unprepared = false, string $uri = '')
|
||||
{
|
||||
if (!empty($attachments)) {
|
||||
$item['attachments'] = $attachments;
|
||||
}
|
||||
|
||||
if ($unprepared) {
|
||||
$_SESSION['authenticated'] = true;
|
||||
$_SESSION['uid'] = $item['uid'];
|
||||
|
@ -157,11 +161,6 @@ class Delayed
|
|||
foreach ($taglist as $tag) {
|
||||
Tag::store($feeditem['uri-id'], Tag::HASHTAG, $tag);
|
||||
}
|
||||
|
||||
foreach ($attachments as $attachment) {
|
||||
$attachment['uri-id'] = $feeditem['uri-id'];
|
||||
Media::insert($attachment);
|
||||
}
|
||||
}
|
||||
|
||||
return $id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue