Merge pull request #837 from annando/no-gplus

Buffer: Remove all traces of Google+
This commit is contained in:
Hypolite Petovan 2019-04-03 09:09:19 -04:00 committed by GitHub
commit e301fa7d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -331,15 +331,6 @@ function buffer_send(App $a, array &$b)
case 'facebook': case 'facebook':
$send = ($b["extid"] != Protocol::FACEBOOK); $send = ($b["extid"] != Protocol::FACEBOOK);
$limit = 0; $limit = 0;
$markup = false;
$includedlinks = false;
$htmlmode = 9;
break;
case 'google':
$send = ($b["extid"] != Protocol::GPLUS);
$limit = 0;
$markup = true;
$includedlinks = false; $includedlinks = false;
$htmlmode = 9; $htmlmode = 9;
break; break;
@ -347,7 +338,6 @@ function buffer_send(App $a, array &$b)
case 'twitter': case 'twitter':
$send = ($b["extid"] != Protocol::TWITTER); $send = ($b["extid"] != Protocol::TWITTER);
$limit = 280; $limit = 280;
$markup = false;
$includedlinks = true; $includedlinks = true;
$htmlmode = 8; $htmlmode = 8;
break; break;
@ -355,7 +345,6 @@ function buffer_send(App $a, array &$b)
case 'linkedin': case 'linkedin':
$send = ($b["extid"] != Protocol::LINKEDIN); $send = ($b["extid"] != Protocol::LINKEDIN);
$limit = 700; $limit = 700;
$markup = false;
$includedlinks = true; $includedlinks = true;
$htmlmode = 2; $htmlmode = 2;
break; break;
@ -366,17 +355,6 @@ function buffer_send(App $a, array &$b)
$item = $b; $item = $b;
// Markup for Google+
if ($markup) {
if ($item["title"] != "") {
$item["title"] = "*" . $item["title"] . "*";
}
$item["body"] = preg_replace("(\[b\](.*?)\[\/b\])ism", '*$1*', $item["body"]);
$item["body"] = preg_replace("(\[i\](.*?)\[\/i\])ism", '_$1_', $item["body"]);
$item["body"] = preg_replace("(\[s\](.*?)\[\/s\])ism", '-$1-', $item["body"]);
}
$post = ItemContent::getPlaintextPost($item, $limit, $includedlinks, $htmlmode); $post = ItemContent::getPlaintextPost($item, $limit, $includedlinks, $htmlmode);
Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG); Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG);
@ -393,8 +371,6 @@ function buffer_send(App $a, array &$b)
// Buffer doesn't add links to Twitter (but pictures) // Buffer doesn't add links to Twitter (but pictures)
if (($profile->service == "twitter") && isset($post["url"]) && ($post["type"] != "photo")) { if (($profile->service == "twitter") && isset($post["url"]) && ($post["type"] != "photo")) {
$post["text"] .= " " . $post["url"]; $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
} }
$message = []; $message = [];