From 4f6c4f4d2db495c03fca6339557e6f5165343b74 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 12 Jan 2013 18:35:27 -0800 Subject: ignore tagged items in reshares from notifications and tag_delivery --- include/items.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 141390969..a4894bb80 100755 --- a/include/items.php +++ b/include/items.php @@ -1552,6 +1552,17 @@ function tag_deliver($uid,$item_id) { else return; + + // Now let's check for a reshare so we don't spam a forum + + $body = preg_replace('/\[share(.*?)\[\/share\]/','',$item['body']); + + if(! preg_match('/@\[url=(.*?)\]' . $u[0]['channel_name'] . '\[\/url\]/',$matches, $body)) { + logger('tag_deliver: mention was in a reshare - ignoring'); + return; + } + + // send a notification require_once('include/enotify.php'); -- cgit v1.2.3