X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fapi.php;h=a9e0edc80836f00d0fcbf4ed762ea6f794996ce2;hb=9a22b4818e0a406c89ff1cc84be4232c8a979f78;hp=dd24a92c9b105bf22e2bbc25532fc7f258e24d78;hpb=178b7eba1b6fea46b73ddc25dac9e669b8446a7a;p=friendica.git diff --git a/include/api.php b/include/api.php index dd24a92c9b..a9e0edc808 100644 --- a/include/api.php +++ b/include/api.php @@ -1162,7 +1162,7 @@ if ($conversation_id > 0) $sql_extra .= ' AND `item`.`parent` = '.intval($conversation_id); - $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`, + $r = q("SELECT STRAIGHT_JOIN `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` @@ -1369,6 +1369,10 @@ logger('API: api_conversation_show: '.$id); + $r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($id)); + if ($r) + $id = $r[0]["parent"]; + $sql_extra = ''; if ($max_id > 0)