aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-05 15:01:53 -0800
committerfriendica <info@friendica.com>2014-02-05 15:01:53 -0800
commitefa30f1b03540981a7718daa7c598157a727f30d (patch)
tree6c52d10bd8f33a7f3d6bfd49cf3a5c64e0b388e9 /include/items.php
parent0844110f7b154a0fb5102362fe732c2b091222d7 (diff)
downloadvolse-hubzilla-efa30f1b03540981a7718daa7c598157a727f30d.tar.gz
volse-hubzilla-efa30f1b03540981a7718daa7c598157a727f30d.tar.bz2
volse-hubzilla-efa30f1b03540981a7718daa7c598157a727f30d.zip
This would be about the 75th attempt to try and prevent duplicated email notifications for comments. Eventually we'll find something that works.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php11
1 files changed, 10 insertions, 1 deletions
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,