This would be about the 75th attempt to try and prevent duplicated email notifications for comments. Eventually we'll find something that works.

This commit is contained in:
friendica 2014-02-05 15:01:53 -08:00
parent 0844110f7b
commit efa30f1b03

View File

@ -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,