aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Share.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Share.php')
-rw-r--r--Zotlabs/Lib/Share.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/Zotlabs/Lib/Share.php b/Zotlabs/Lib/Share.php
index 8abbfda80..0bcee5247 100644
--- a/Zotlabs/Lib/Share.php
+++ b/Zotlabs/Lib/Share.php
@@ -118,11 +118,8 @@ class Share {
$photo_bb = $object['body'];
}
- if (strpos($this->item['body'], "[/share]") !== false) {
- $pos = strpos($this->item['body'], "[share");
- $bb = substr($this->item['body'], $pos);
- } else {
- $bb = "[share author='".urlencode($this->item['author']['xchan_name']).
+ if (!str_contains($this->item['body'], '[/share]')) {
+ $bb .= "[share author='".urlencode($this->item['author']['xchan_name']).
"' profile='" . $this->item['author']['xchan_url'] .
"' avatar='" . $this->item['author']['xchan_photo_s'] .
"' link='" . $this->item['plink'] .
@@ -137,7 +134,6 @@ class Share {
}
return $bb;
-
}
}