mirror of
https://github.com/friendica/friendica
synced 2025-04-26 00:30:12 +00:00
Store implicit mentions
This commit is contained in:
parent
f4543b2cf7
commit
21103a5735
3 changed files with 19 additions and 9 deletions
|
@ -115,7 +115,18 @@ class Tag
|
|||
}
|
||||
}
|
||||
|
||||
DBA::insert('post-tag', ['uri-id' => $uriid, 'type' => $type, 'tid' => $tagid, 'cid' => $cid], true);
|
||||
$fields = ['uri-id' => $uriid, 'type' => $type, 'tid' => $tagid, 'cid' => $cid];
|
||||
|
||||
if (in_array($type, [Tag::MENTION, Tag::EXCLUSIVE_MENTION, Tag::IMPLICIT_MENTION])) {
|
||||
$condition = $fields;
|
||||
$condition['type'] = [Tag::MENTION, Tag::EXCLUSIVE_MENTION, Tag::IMPLICIT_MENTION];
|
||||
if (DBA::exists('post-tag', $condition)) {
|
||||
Logger::info('Tag already exists', $fields);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
DBA::insert('post-tag', $fields, true);
|
||||
|
||||
Logger::info('Stored tag/mention', ['uri-id' => $uriid, 'tag-id' => $tagid, 'contact-id' => $cid, 'callstack' => System::callstack(8)]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue