From: Tobias Diekershoff Date: Sun, 27 Dec 2015 14:58:32 +0000 (+0100) Subject: Merge pull request #2197 from annando/1512-ostatus-comment X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8d8dc2d060ee1d8d5f7754aef2459e5e3f1aa1a9;p=friendica.git Merge pull request #2197 from annando/1512-ostatus-comment Reworked delivery and notifier process - changed OStatus behaviour --- 8d8dc2d060ee1d8d5f7754aef2459e5e3f1aa1a9 diff --cc include/ostatus.php index 7df9b2e6b8,e1f6d6b995..1087596e2f --- a/include/ostatus.php +++ b/include/ostatus.php @@@ -1311,19 -1342,38 +1342,37 @@@ function ostatus_add_author($doc, $owne return $author; } -/* -To-Do: Picture attachments should look like this: - -https://status.pirati.ca/attachment/572819 - +/** + * @TODO Picture attachments should look like this: + * https://status.pirati.ca/attachment/572819 + * */ - function ostatus_entry($doc, $item, $owner, $toplevel = false) { + function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false) { $a = get_app(); - if (!$toplevel) { + $is_repeat = false; + + /* if (!$repeat) { + $repeated_guid = get_reshared_guid($item); + + if ($repeated_guid != "") { + $r = q("SELECT * FROM `item` WHERE `uid` = %d AND `guid` = '%s' LIMIT 1", + intval($owner["uid"]), dbesc($repeated_guid)); + if ($r) { + $repeated_item = $r[0]; + $is_repeat = true; + } + } + } + */ + if (!$toplevel AND !$repeat) { $entry = $doc->createElement("entry"); $title = sprintf("New note by %s", $owner["nick"]); + } elseif (!$toplevel AND $repeat) { + $entry = $doc->createElement("activity:object"); + $title = sprintf("New note by %s", $owner["nick"]); } else { $entry = $doc->createElementNS(NS_ATOM, "entry");