]> git.mxchange.org Git - friendica-addons.git/blobdiff - buffer/buffer.php
Merge pull request #384 from annando/1609-ignorelist-rendertime
[friendica-addons.git] / buffer / buffer.php
index 90a797583b65e710aa461f002f8c29819640421d..162600d649c2facbfeec604ac743cba43365c20a 100644 (file)
@@ -341,13 +341,13 @@ function buffer_send(&$a,&$b) {
                                // Seems like a bug to me
                                // Buffer doesn't add links to Twitter and App.net (but pictures)
                                //if ($includedlinks AND isset($post["url"]))
-                               if (($profile->service == "twitter") AND isset($post["url"]))
+                               if (($profile->service == "twitter") AND isset($post["url"]) AND ($post["type"] != "photo"))
                                        $post["text"] .= " ".$post["url"];
-                               elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND isset($post["title"])) {
+                               elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND isset($post["title"]) AND ($post["type"] != "photo")) {
                                        $post["title"] = shortenmsg($post["title"], 90);
                                        $post["text"] = shortenmsg($post["text"], $limit - (24 + strlen($post["title"])));
                                        $post["text"] .= "\n[".$post["title"]."](".$post["url"].")";
-                               } elseif (($profile->service == "appdotnet") AND isset($post["url"]))
+                               } elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND ($post["type"] != "photo"))
                                        $post["text"] .= " ".$post["url"];
                                elseif ($profile->service == "google")
                                        $post["text"] .= html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); // Send a special blank to identify the post through the "fromgplus" addon
@@ -377,6 +377,7 @@ function buffer_send(&$a,&$b) {
                                        $message["media[thumbnail]"] = $post["preview"];
 
                                //print_r($message);
+                               logger("buffer_send: data for message ".$b["id"].": ".print_r($message, true), LOGGER_DEBUG);
                                $ret = $buffer->go('/updates/create', $message);
                                logger("buffer_send: send message ".$b["id"]." result: ".print_r($ret, true), LOGGER_DEBUG);
                        }