Google+/Twitter/GNU Social: Prevent posting loops when mirroring posts #382

Merged
annando merged 12 commits from 1603-fromgplus-keywords into master 2016-11-12 18:56:41 +01:00
Showing only changes of commit b3eb963a2b - Show all commits

View file

@ -10,6 +10,7 @@
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
require_once('mod/share.php');
require_once('mod/parse_url.php');
function fromgplus_install() {
register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
@ -323,6 +324,11 @@ function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
if ($quote != "")
$pagedata["text"] = $quote;
// Add Keywords to page link
$data = parseurl_getsiteinfo_cached($pagedata["url"], true);
if (isset($data["keywords"]))
$pagedata["keywords"] = $data["keywords"];
break;
case "photo":