Like on uid=0 does work now

This commit is contained in:
Michael 2017-12-27 22:21:40 +00:00
parent 9acc2ffc24
commit 0bcbe6034e
2 changed files with 3 additions and 9 deletions

View file

@ -154,12 +154,10 @@ class Notifier {
FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d AND visible AND NOT moderated ORDER BY `id` ASC",
intval($parent_id)
);
logger('Blubb: a-'.$item_id);
if (!count($items)) {
return;
}
logger('Blubb: b-'.$item_id);
// avoid race condition with deleting entries
if ($items[0]['deleted']) {
@ -173,13 +171,11 @@ logger('Blubb: b-'.$item_id);
$top_level = true;
}
}
logger('Blubb: 0-'.$item_id.' - '.$uid);
$owner = User::getOwnerDataById($uid);
if (!$owner) {
return;
}
logger('Blubb: 1-'.$item_id);
$walltowall = ($top_level && ($owner['id'] != $items[0]['contact-id']) ? true : false);
@ -197,14 +193,12 @@ logger('Blubb: 1-'.$item_id);
// fill this in with a single salmon slap if applicable
$slap = '';
logger('Blubb: 2-'.$item_id);
if (! ($mail || $fsuggest || $relocate)) {
$slap = OStatus::salmon($target_item, $owner);
$parent = $items[0];
logger('Blubb: 3-'.$item_id);
$thr_parent = q("SELECT `network`, `author-link`, `owner-link` FROM `item` WHERE `uri` = '%s' AND `uid` = %d",
dbesc($target_item["thr-parent"]), intval($target_item["uid"]));