Bugfix: The subscribe process took the own contact by random ...

This commit is contained in:
Michael Vogel 2015-12-12 17:55:57 +01:00
parent 0869cce45f
commit 5a1041578c

View file

@ -70,8 +70,8 @@ function pubsubhubbub_init(&$a) {
} }
// get corresponding row from contact table // get corresponding row from contact table
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0" . $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND NOT `blocked`".
" AND `pending` = 0 LIMIT 1", " AND NOT `pending` AND `self` LIMIT 1",
intval($owner['uid'])); intval($owner['uid']));
if(!count($r)) { if(!count($r)) {
logger('pubsubhubbub: contact not found.'); logger('pubsubhubbub: contact not found.');