-- ------------------------------------------
-- Friendica 2022.05-rc (Siberian Iris)
--- DB_UPDATE_VERSION 1464
+-- DB_UPDATE_VERSION 1465
-- ------------------------------------------
`post`.`received` AS `received`,
`post`.`created` AS `created`,
`post-thread`.`commented` AS `commented`,
+ `post`.`private` AS `private`,
+ `post`.`visible` AS `visible`,
+ `post`.`deleted` AS `deleted`,
`post`.`thr-parent-id` AS `thr-parent-id`,
`post`.`author-id` AS `author-id`,
`post`.`gravity` AS `gravity`
use BadMethodCallException;
use Friendica\Database\Database;
use Friendica\DI;
+use Friendica\Model\Item;
use Friendica\Protocol\ActivityPub;
class Collection
*/
public static function selectToArrayForContact(int $cid, int $type = self::FEATURED, array $fields = [])
{
- return DBA::selectToArray('collection-view', $fields, ['cid' => $cid, 'type' => $type]);
+ return DBA::selectToArray('collection-view', $fields, ['cid' => $cid, 'private' => [Item::PUBLIC, Item::UNLISTED], 'deleted' => false, 'type' => $type]);
}
}
];
if ($conv->getProfileOwner() == local_user() && ($item['uid'] != 0)) {
- if ($origin) {
+ if ($origin && in_array($item['private'], [Item::PUBLIC, Item::UNLISTED])) {
$ispinned = ($item['featured'] ? 'pinned' : 'unpinned');
$pin = [
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1464);
+ define('DB_UPDATE_VERSION', 1465);
}
return [
"received" => ["post", "received"],
"created" => ["post", "created"],
"commented" => ["post-thread", "commented"],
+ "private" => ["post", "private"],
+ "visible" => ["post", "visible"],
+ "deleted" => ["post", "deleted"],
"thr-parent-id" => ["post", "thr-parent-id"],
"author-id" => ["post", "author-id"],
"gravity" => ["post", "gravity"],