mirror of
https://github.com/friendica/friendica
synced 2025-04-26 23:50:11 +00:00
Set the quote-uri-id when a post is linked
This commit is contained in:
parent
28b26c892b
commit
4a61867f79
2 changed files with 34 additions and 2 deletions
|
@ -1130,4 +1130,19 @@ class Media
|
|||
(Proxy::getPixelsFromSize($size) ? Proxy::getPixelsFromSize($size) . '/' : '') .
|
||||
$id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the uri-id of an attached uri-post for a given uri-id
|
||||
*
|
||||
* @param integer $uri_id Uri-Id of the post
|
||||
* @return integer uri-id of the first attached post
|
||||
*/
|
||||
public static function getActivityUriId(int $uri_id): int
|
||||
{
|
||||
$posts = self::getByURIId($uri_id, [self::ACTIVITY]);
|
||||
if (!$posts) {
|
||||
return 0;
|
||||
}
|
||||
return reset($posts)['media-uri-id'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue