]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #2197 from annando/1512-ostatus-comment
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 27 Dec 2015 14:58:32 +0000 (15:58 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 27 Dec 2015 14:58:32 +0000 (15:58 +0100)
Reworked delivery and notifier process - changed OStatus behaviour

1  2 
boot.php
include/notifier.php
include/ostatus.php

diff --cc boot.php
Simple merge
Simple merge
index 7df9b2e6b8fdc047f627b2196fc0bb85427686b8,e1f6d6b995df1e0362cf45a625eb746451ee115a..1087596e2f23aed16322d0826ab66d8ca5fd7170
@@@ -1311,19 -1342,38 +1342,37 @@@ function ostatus_add_author($doc, $owne
        return $author;
  }
  
 -/*
 -To-Do: Picture attachments should look like this:
 -
 -<a href="https://status.pirati.ca/attachment/572819" title="https://status.pirati.ca/file/heluecht-20151202T222602-rd3u49p.gif"
 -class="attachment thumbnail" id="attachment-572819" rel="nofollow external">https://status.pirati.ca/attachment/572819</a>
 -
 +/** 
 + * @TODO Picture attachments should look like this:
 + *    <a href="https://status.pirati.ca/attachment/572819" title="https://status.pirati.ca/file/heluecht-20151202T222602-rd3u49p.gif"
 + *    class="attachment thumbnail" id="attachment-572819" rel="nofollow external">https://status.pirati.ca/attachment/572819</a>
 + * 
  */
  
- 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");