From efa30f1b03540981a7718daa7c598157a727f30d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 5 Feb 2014 15:01:53 -0800 Subject: This would be about the 75th attempt to try and prevent duplicated email notifications for comments. Eventually we'll find something that works. --- include/items.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index 860d714d1..35865086e 100755 --- a/include/items.php +++ b/include/items.php @@ -2107,6 +2107,15 @@ function send_status_notifications($post_id,$item) { } } + $link = get_app()->get_baseurl() . '/display/' . $item['mid']; + + $r = q("select id from notify where link = '%s' and uid = %d limit 1", + dbesc($link), + intval($item['uid']) + ); + if($r) + $notify = false; + if(! $notify) return; require_once('include/enotify.php'); @@ -2115,7 +2124,7 @@ function send_status_notifications($post_id,$item) { 'from_xchan' => $item['author_xchan'], 'to_xchan' => $r[0]['channel_hash'], 'item' => $item, - 'link' => get_app()->get_baseurl() . '/display/' . $item['mid'], + 'link' => $link, 'verb' => ACTIVITY_POST, 'otype' => 'item', 'parent' => $parent, -- cgit v1.2.3