mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:10:11 +00:00
Fix contact issues with fake reshares from Twitter
This commit is contained in:
parent
1d8b809227
commit
2a213c215e
3 changed files with 45 additions and 4 deletions
|
@ -905,7 +905,17 @@ class BBCode extends BaseObject
|
|||
// We only call this so that a previously unknown contact can be added.
|
||||
// This is important for the function "Model\Contact::getDetailsByURL()".
|
||||
// This function then can fetch an entry from the contact table.
|
||||
Contact::getIdForURL($attributes['profile'], 0, true);
|
||||
$default['url'] = $attributes['profile'];
|
||||
|
||||
if (!empty($attributes['author'])) {
|
||||
$default['name'] = $attributes['author'];
|
||||
}
|
||||
|
||||
if (!empty($attributes['avatar'])) {
|
||||
$default['photo'] = $attributes['avatar'];
|
||||
}
|
||||
|
||||
Contact::getIdForURL($attributes['profile'], 0, true, $default);
|
||||
|
||||
$author_contact = Contact::getDetailsByURL($attributes['profile']);
|
||||
$author_contact['addr'] = defaults($author_contact, 'addr' , Protocol::getAddrFromProfileUrl($attributes['profile']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue