mirror of
https://github.com/friendica/friendica
synced 2025-04-27 19:50:12 +00:00
Fix reply via API / fix missing variable
This commit is contained in:
parent
c27fdc7167
commit
b46f18bdf9
2 changed files with 14 additions and 11 deletions
|
@ -950,18 +950,19 @@ class Item
|
|||
|
||||
public function initializePost(array $post): array
|
||||
{
|
||||
$post['network'] = Protocol::DFRN;
|
||||
$post['protocol'] = Conversation::PARCEL_DIRECT;
|
||||
$post['direction'] = Conversation::PUSH;
|
||||
$post['received'] = DateTimeFormat::utcNow();
|
||||
$post['origin'] = true;
|
||||
$post['wall'] = $post['wall'] ?? true;
|
||||
$post['guid'] = $post['guid'] ?? System::createUUID();
|
||||
$post['verb'] = $post['verb'] ?? Activity::POST;
|
||||
$post['network'] = Protocol::DFRN;
|
||||
$post['protocol'] = Conversation::PARCEL_DIRECT;
|
||||
$post['direction'] = Conversation::PUSH;
|
||||
$post['received'] = DateTimeFormat::utcNow();
|
||||
$post['origin'] = true;
|
||||
$post['wall'] = $post['wall'] ?? true;
|
||||
$post['guid'] = $post['guid'] ?? System::createUUID();
|
||||
$post['verb'] = $post['verb'] ?? Activity::POST;
|
||||
$post['uri'] = $post['uri'] ?? ItemModel::newURI($post['guid']);
|
||||
$post['thr-parent'] = $post['thr-parent'] ?? $post['uri'];
|
||||
|
||||
if (empty($post['uri'])) {
|
||||
$post['thr-parent'] = $post['uri'] = ItemModel::newURI($post['guid']);
|
||||
$post['gravity'] = ItemModel::GRAVITY_PARENT;
|
||||
if (empty($post['gravity'])) {
|
||||
$post['gravity'] = ($post['uri'] == $post['thr-parent']) ? ItemModel::GRAVITY_PARENT : ItemModel::GRAVITY_COMMENT;
|
||||
}
|
||||
|
||||
$owner = User::getOwnerDataById($post['uid']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue