]> git.mxchange.org Git - friendica.git/commitdiff
Some new fields for the protocol
authorMichael Vogel <icarus@dabo.de>
Tue, 26 Jan 2016 11:18:57 +0000 (12:18 +0100)
committerMichael Vogel <icarus@dabo.de>
Tue, 26 Jan 2016 11:18:57 +0000 (12:18 +0100)
include/dfrn.php

index ee29e7347cc0de1ff50f2f9a11d1396240d898cf..ac67bf09743a5f0a78acff2fd86994a739aa8984 100644 (file)
@@ -456,6 +456,9 @@ class dfrn {
                $attributes = array("dfrn:updated" => $namdate);
                xml_add_element($doc, $author, "uri", app::get_baseurl().'/profile/'.$owner["nickname"], $attributes);
 
+               $attributes = array("dfrn:updated" => $namdate);
+               xml_add_element($doc, $author, "dfrn:handle", $owner["addr"], $attributes);
+
                $attributes = array("rel" => "photo", "type" => "image/jpeg", "dfrn:updated" => $picdate,
                                        "media:width" => 175, "media:height" => 175, "href" => $owner['photo']);
                xml_add_element($doc, $author, "link", "", $attributes);
@@ -560,6 +563,7 @@ class dfrn {
                $author = $doc->createElement($element);
                xml_add_element($doc, $author, "name", $contact["name"]);
                xml_add_element($doc, $author, "uri", $contact["url"]);
+               xml_add_element($doc, $author, "dfrn:handle", $contact["addr"]);
 
                /// @Todo
                /// - Check real image type and image size
@@ -711,7 +715,9 @@ class dfrn {
                if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) {
                        $parent = q("SELECT `guid` FROM `item` WHERE `id` = %d", intval($item["parent"]));
                        $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
-                       $attributes = array("ref" => $parent_item, "type" => "text/html", "href" => app::get_baseurl().'/display/'.$parent[0]['guid']);
+                       $attributes = array("ref" => $parent_item, "type" => "text/html",
+                                               "href" => app::get_baseurl().'/display/'.$parent[0]['guid'],
+                                               "dfrn:diaspora_guid" => $parent[0]['guid']);
                        xml_add_element($doc, $entry, "thr:in-reply-to", "", $attributes);
                }