X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=pumpio%2Fpumpio.php;h=5f03c6c57f499c766508af48e37a27420509b4e2;hb=a50ca549996d9e90c3bb7b616675f2cb6b8d6a27;hp=19f111908a3ca6cc551ca18551edaf9bea38405a;hpb=b4644212d48256d636f9fbd063b228c23b03b2f0;p=friendica-addons.git diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 19f11190..5f03c6c5 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -436,6 +436,8 @@ function pumpio_send(App $a, array &$b) Logger::log("pumpio_send: parameter ".print_r($b, true), Logger::DATA); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + if ($b['parent'] != $b['id']) { // Looking if its a reply to a pumpio post $condition = ['id' => $b['parent'], 'network' => Protocol::PUMPIO]; @@ -1299,10 +1301,10 @@ function pumpio_fetchinbox(App $a, $uid) $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", intval($uid)); - $lastitems = q("SELECT `uri` FROM `thread` - INNER JOIN `item` ON `item`.`id` = `thread`.`iid` - WHERE `thread`.`network` = '%s' AND `thread`.`uid` = %d AND `item`.`extid` != '' - ORDER BY `thread`.`commented` DESC LIMIT 10", + $lastitems = q("SELECT `uri` FROM `post-thread-user` + INNER JOIN `post-view` ON `post-view`.`id` = `post-thread-user`.`id` + WHERE `post-thread-user`.`network` = '%s' AND `post-thread-user`.`uid` = %d AND `post-view`.`extid` != '' + ORDER BY `post-thread-user`.`commented` DESC LIMIT 10", DBA::escape(Protocol::PUMPIO), intval($uid) );