mirror of
https://github.com/friendica/friendica
synced 2025-04-26 19:10:11 +00:00
Improved handling of native quotes
This commit is contained in:
parent
f418687a71
commit
3c169b534e
11 changed files with 204 additions and 217 deletions
|
@ -319,16 +319,12 @@ class Tag
|
|||
$tags = self::TAG_CHARACTER[self::HASHTAG] . self::TAG_CHARACTER[self::MENTION] . self::TAG_CHARACTER[self::EXCLUSIVE_MENTION];
|
||||
}
|
||||
|
||||
// Only remove the shared data from "real" reshares
|
||||
$shared = DI::contentItem()->getSharedPost($item, ['uri-id']);
|
||||
if (!empty($shared)) {
|
||||
$item['body'] = BBCode::removeSharedData($item['body']);
|
||||
}
|
||||
|
||||
foreach (self::getFromBody($item['body'], $tags) as $tag) {
|
||||
self::storeByHash($item['uri-id'], $tag[1], $tag[3], $tag[2]);
|
||||
}
|
||||
|
||||
$shared = DI::contentItem()->getSharedPost($item, ['uri-id']);
|
||||
|
||||
// Search for hashtags in the shared body (but only if hashtags are wanted)
|
||||
if (!empty($shared) && (strpos($tags, self::TAG_CHARACTER[self::HASHTAG]) !== false)) {
|
||||
foreach (self::getByURIId($shared['post']['uri-id'], [self::HASHTAG]) as $tag) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue