diff options
author | friendica <info@friendica.com> | 2013-01-12 18:35:27 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-12 18:35:27 -0800 |
commit | 4f6c4f4d2db495c03fca6339557e6f5165343b74 (patch) | |
tree | 48d0ef9d0ed77715581499eb170d6f31d8f12911 | |
parent | d5c71e569143054582be589849bc9268167bbe8c (diff) | |
download | volse-hubzilla-4f6c4f4d2db495c03fca6339557e6f5165343b74.tar.gz volse-hubzilla-4f6c4f4d2db495c03fca6339557e6f5165343b74.tar.bz2 volse-hubzilla-4f6c4f4d2db495c03fca6339557e6f5165343b74.zip |
ignore tagged items in reshares from notifications and tag_delivery
-rwxr-xr-x | include/items.php | 11 |
1 files changed, 11 insertions, 0 deletions
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'); |