aboutsummaryrefslogtreecommitdiffstats
path: root/mod/notifications.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-31 00:30:34 +0200
committerzottel <github@zottel.net>2012-03-31 00:30:34 +0200
commitf39e8126773e2a030cf84c8b9d428cc78546c1b9 (patch)
treeec1318b325ec3dc5ab2bc4ded5dae1c657b8fc7b /mod/notifications.php
parent2212e6931096d188be2dea27bcb4877f16c5c2f8 (diff)
parentaace55df0ad279d74c5e612078c3f29d114389dc (diff)
downloadvolse-hubzilla-f39e8126773e2a030cf84c8b9d428cc78546c1b9.tar.gz
volse-hubzilla-f39e8126773e2a030cf84c8b9d428cc78546c1b9.tar.bz2
volse-hubzilla-f39e8126773e2a030cf84c8b9d428cc78546c1b9.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/notifications.php')
-rwxr-xr-xmod/notifications.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/notifications.php b/mod/notifications.php
index 551b307db..690a99562 100755
--- a/mod/notifications.php
+++ b/mod/notifications.php
@@ -37,7 +37,11 @@ function notifications_post(&$a) {
intval($intro_id)
);
if(! $fid) {
- $r = q("DELETE FROM `contact` WHERE `id` = %d AND `uid` = %d AND `self` = 0 LIMIT 1",
+
+ // The check for blocked and pending is in case the friendship was already approved
+ // and we just want to get rid of the now pointless notification
+
+ $r = q("DELETE FROM `contact` WHERE `id` = %d AND `uid` = %d AND `self` = 0 AND `blocked` = 1 AND `pending` = 1 LIMIT 1",
intval($contact_id),
intval(local_user())
);