aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-04 16:44:23 -0800
committerfriendica <info@friendica.com>2013-11-04 16:44:23 -0800
commitc61a0d9dabfa7c615e33c721cbf57582939b157b (patch)
treeab98f2634c628d04e9b4ced0b9990092da282110 /include
parentd783183572d26585983959564a1b38b6e63b95ff (diff)
downloadvolse-hubzilla-c61a0d9dabfa7c615e33c721cbf57582939b157b.tar.gz
volse-hubzilla-c61a0d9dabfa7c615e33c721cbf57582939b157b.tar.bz2
volse-hubzilla-c61a0d9dabfa7c615e33c721cbf57582939b157b.zip
private tagged posts weren't creating second delivery chain - they were incorrectly being marked as "in a reshare" due to being obscured.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 18aab93fa..5fcbb0cc5 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2216,10 +2216,23 @@ function tag_deliver($uid,$item_id) {
intval($item_id)
);
+
+
// At this point we've determined that the person receiving this post was mentioned in it or it is a union.
// Now let's check if this mention was inside a reshare so we don't spam a forum
+ // If it's private we may have to unobscure it momentarily so that we can parse it.
+
+ $body = '';
+
+ if($item['item_flags'] & ITEM_OBSCURED) {
+ $key = get_config('system','prvkey');
+ if($item['body'])
+ $body = aes_unencapsulate(json_decode_plus($item['body']),$key);
+ }
+ else
+ $body = $item['body'];
- $body = preg_replace('/\[share(.*?)\[\/share\]/','',$item['body']);
+ $body = preg_replace('/\[share(.*?)\[\/share\]/','',$body);
$pattern = '/@\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($u[0]['channel_name'],'/') . '\[\/zrl\]/';