tgroup_check - decrypt if obscured before checking body text for reshares
This commit is contained in:
parent
961049f5fa
commit
55f64c3736
@ -2974,7 +2974,15 @@ function tgroup_check($uid,$item) {
|
||||
// At this point we've determined that the person receiving this post was mentioned in it.
|
||||
// Now let's check if this mention was inside a reshare so we don't spam a forum
|
||||
|
||||
$body = preg_replace('/\[share(.*?)\[\/share\]/','',$item['body']);
|
||||
|
||||
$body = $item['body'];
|
||||
|
||||
if(array_key_exists('item_flags',$item) && ($item['item_flags'] & ITEM_OBSCURED) && $body) {
|
||||
$key = get_config('system','prvkey');
|
||||
$body = crypto_unencapsulate(json_decode($body,true),$key);
|
||||
}
|
||||
|
||||
$body = preg_replace('/\[share(.*?)\[\/share\]/','',$body);
|
||||
|
||||
$pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($term['term'] . '+','/') . '\[\/zrl\]/';
|
||||
|
||||
|
Reference in New Issue
Block a user