Fix "Undefined index: reply-to-id"

This commit is contained in:
Michael 2021-07-09 18:10:48 +00:00
parent e0fdde3287
commit d6c1e1fd1c

View File

@ -26,6 +26,7 @@ use Friendica\Content\Text\HTML;
use Friendica\Content\Text\Markdown; use Friendica\Content\Text\Markdown;
use Friendica\Core\Logger; use Friendica\Core\Logger;
use Friendica\Core\Protocol; use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA; use Friendica\Database\DBA;
use Friendica\DI; use Friendica\DI;
use Friendica\Model\APContact; use Friendica\Model\APContact;
@ -191,6 +192,10 @@ class Processor
*/ */
public static function createItem($activity) public static function createItem($activity)
{ {
if (empty($activity['reply-to-id'])) {
$activity['reply-to-id'] = $activity['id'];
}
$item = []; $item = [];
$item['verb'] = Activity::POST; $item['verb'] = Activity::POST;
$item['thr-parent'] = $activity['reply-to-id']; $item['thr-parent'] = $activity['reply-to-id'];