mirror of
https://github.com/friendica/friendica
synced 2024-11-13 07:42:54 +00:00
Merge pull request #7210 from annando/diaspora-edit
Fix edited messages for Diaspora
This commit is contained in:
commit
a9e534ea79
1 changed files with 4 additions and 0 deletions
|
@ -3562,6 +3562,7 @@ class Diaspora
|
||||||
$public = ($item["private"] ? "false" : "true");
|
$public = ($item["private"] ? "false" : "true");
|
||||||
|
|
||||||
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
|
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
|
||||||
|
$edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM);
|
||||||
|
|
||||||
// Detect a share element and do a reshare
|
// Detect a share element and do a reshare
|
||||||
if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {
|
if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {
|
||||||
|
@ -3616,6 +3617,7 @@ class Diaspora
|
||||||
$message = ["author" => $myaddr,
|
$message = ["author" => $myaddr,
|
||||||
"guid" => $item["guid"],
|
"guid" => $item["guid"],
|
||||||
"created_at" => $created,
|
"created_at" => $created,
|
||||||
|
"edited_at" => $edited,
|
||||||
"public" => $public,
|
"public" => $public,
|
||||||
"text" => $body,
|
"text" => $body,
|
||||||
"provider_display_name" => $item["app"],
|
"provider_display_name" => $item["app"],
|
||||||
|
@ -3794,11 +3796,13 @@ class Diaspora
|
||||||
|
|
||||||
$text = html_entity_decode(BBCode::toMarkdown($body));
|
$text = html_entity_decode(BBCode::toMarkdown($body));
|
||||||
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
|
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
|
||||||
|
$edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM);
|
||||||
|
|
||||||
$comment = [
|
$comment = [
|
||||||
"author" => self::myHandle($owner),
|
"author" => self::myHandle($owner),
|
||||||
"guid" => $item["guid"],
|
"guid" => $item["guid"],
|
||||||
"created_at" => $created,
|
"created_at" => $created,
|
||||||
|
"edited_at" => $edited,
|
||||||
"parent_guid" => $toplevel_item["guid"],
|
"parent_guid" => $toplevel_item["guid"],
|
||||||
"text" => $text,
|
"text" => $text,
|
||||||
"author_signature" => ""
|
"author_signature" => ""
|
||||||
|
|
Loading…
Reference in a new issue