don't delete contact from a friend request if friendship was already established
This commit is contained in:
parent
5b4bb347a6
commit
cfdfcb37cb
2 changed files with 6 additions and 2 deletions
2
boot.php
2
boot.php
|
@ -9,7 +9,7 @@ require_once('include/nav.php');
|
||||||
require_once('include/cache.php');
|
require_once('include/cache.php');
|
||||||
|
|
||||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_VERSION', '2.3.1296' );
|
define ( 'FRIENDICA_VERSION', '2.3.1297' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1133 );
|
define ( 'DB_UPDATE_VERSION', 1133 );
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,11 @@ function notifications_post(&$a) {
|
||||||
intval($intro_id)
|
intval($intro_id)
|
||||||
);
|
);
|
||||||
if(! $fid) {
|
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($contact_id),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue