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");