mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:00:16 +00:00
Fix: Don't attach unknown media to posts
This commit is contained in:
parent
2077e00eae
commit
76d469675e
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ use Friendica\Content\Post\Collection;
|
|||
use Friendica\Content\Post\Entity;
|
||||
use Friendica\Content\Post\Factory;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Util\Strings;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
@ -62,7 +63,7 @@ class PostMedia extends BaseRepository
|
|||
|
||||
public function selectByUriId(int $uriId): Collection\PostMedias
|
||||
{
|
||||
return $this->_select(['uri-id' => $uriId]);
|
||||
return $this->_select(["`uri-id` = ? AND `type` != ?", $uriId, Post\Media::UNKNOWN]);
|
||||
}
|
||||
|
||||
public function save(Entity\PostMedia $PostMedia): Entity\PostMedia
|
||||
|
|
Loading…
Reference in a new issue