]> git.mxchange.org Git - friendica.git/commitdiff
Posts from contacts weren't displayed correctly
authorMichael <heluecht@pirati.ca>
Fri, 5 Jan 2018 19:47:55 +0000 (19:47 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 5 Jan 2018 19:47:55 +0000 (19:47 +0000)
include/conversation.php
src/Model/Contact.php

index 020eca18418ffaf8cda8f0110f4b793044e2fa3b..472896ffec2e45c3d342e8d11cd036bd1c2a8f05 100644 (file)
@@ -628,7 +628,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                        $writable = false;
                }
 
-               if ($mode === 'network-new' || $mode === 'search' || $community_readonly) {
+               if (in_array($mode, ['network-new', 'search', 'contact-posts']) || $community_readonly) {
 
                        /*
                         * "New Item View" on network page or search page results
index 067a2fda7f104e44680937d287696b04d1c2100a..3e8b1f5d65ce26a10956ee7ffc90ce05f9321c55 100644 (file)
@@ -875,11 +875,13 @@ class Contact extends BaseObject
                $contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id');
 
                $r = q(item_query() . " AND `item`.`" . $contact . "` = %d AND " . $sql .
-                       " ORDER BY `item`.`created` DESC LIMIT %d, %d", intval($author_id), intval(local_user()), intval($a->pager['start']), intval($a->pager['itemspage'])
+                       " AND `item`.`verb` = '%s' ORDER BY `item`.`created` DESC LIMIT %d, %d",
+                       intval($author_id), intval(local_user()), dbesc(ACTIVITY_POST),
+                       intval($a->pager['start']), intval($a->pager['itemspage'])
                );
 
 
-               $o = conversation($a, $r, 'community', false);
+               $o = conversation($a, $r, 'contact-posts', false);
 
                $o .= alt_pager($a, count($r));