Use a more simple HTML for API output
authorMichael <heluecht@pirati.ca>
Sat, 10 Feb 2018 13:33:15 +0000 (13:33 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 10 Feb 2018 13:33:15 +0000 (13:33 +0000)
include/api.php
src/Protocol/DFRN.php

index 4163156..e0ffef6 100644 (file)
@@ -2647,7 +2647,7 @@ function api_convert_item($item)
                $statustext = substr($statustext, 0, 1000)."... \n".$item["plink"];
        }
 
-       $statushtml = trim(bbcode($body, false, false));
+       $statushtml = bbcode(api_clean_attachments($body), false, false);
 
        // Workaround for clients with limited HTML parser functionality
        $search = ["<br>", "<blockquote>", "</blockquote>",
index ca88148..ab778ff 100644 (file)
@@ -2412,7 +2412,7 @@ class DFRN
 
                // Is there an existing item?
                if (DBM::is_result($current) && !self::isEditedTimestampNewer($current[0], $item)) {
-                       logger("Item ".$item["uri"]." already existed in this version.", LOGGER_DEBUG);
+                       logger("Item ".$item["uri"]." (".$item['edited'].") already existed.", LOGGER_DEBUG);
                        return;
                }