]> git.mxchange.org Git - friendica-addons.git/blobdiff - pumpio/pumpio.php
Use workerqueue for mailstream jobs instead of custom table
[friendica-addons.git] / pumpio / pumpio.php
index 19f111908a3ca6cc551ca18551edaf9bea38405a..5f03c6c57f499c766508af48e37a27420509b4e2 100644 (file)
@@ -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)
                        );