aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-18 17:46:34 -0700
committerzotlabs <mike@macgirvin.com>2017-09-18 17:46:34 -0700
commite812836a601f5fda32b520e9af29f89ae2227524 (patch)
treefc2ce7f777cf8cbe7b35d6592be90cebc7d8897d
parent5c379b4d356169b8eada1f6e1851dbc7f5af6933 (diff)
downloadvolse-hubzilla-e812836a601f5fda32b520e9af29f89ae2227524.tar.gz
volse-hubzilla-e812836a601f5fda32b520e9af29f89ae2227524.tar.bz2
volse-hubzilla-e812836a601f5fda32b520e9af29f89ae2227524.zip
provide rel=alternate link if no reshare content in post
-rw-r--r--include/feedutils.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 145d4361c..4cc194fb1 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -811,6 +811,7 @@ function feed_get_reshare(&$res,$item) {
}
$attach = $share['links'];
+
if($attach) {
foreach($attach as $att) {
if($att['rel'] === 'alternate') {
@@ -845,6 +846,10 @@ function feed_get_reshare(&$res,$item) {
}
}
+ if((! $body) && ($share['alternate'])) {
+ $body = $share['alternate'];
+ }
+
$res['body'] = "[share author='" . urlencode($share['author']) .
"' profile='" . $share['profile'] .
"' avatar='" . $share['avatar'] .