From 5a1041578cdbb1cf9921392c333c14efd6b7e937 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 12 Dec 2015 17:55:57 +0100 Subject: [PATCH] Bugfix: The subscribe process took the own contact by random ... --- mod/pubsubhubbub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/pubsubhubbub.php b/mod/pubsubhubbub.php index ad75268a9..5d7621cc7 100644 --- a/mod/pubsubhubbub.php +++ b/mod/pubsubhubbub.php @@ -70,8 +70,8 @@ function pubsubhubbub_init(&$a) { } // get corresponding row from contact table - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0" . - " AND `pending` = 0 LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND NOT `blocked`". + " AND NOT `pending` AND `self` LIMIT 1", intval($owner['uid'])); if(!count($r)) { logger('pubsubhubbub: contact not found.');