use Friendica\Module\Security\Login;
use Friendica\Network\HTTPException\BadRequestException;
use Friendica\Network\HTTPException\NotFoundException;
use Friendica\Module\Security\Login;
use Friendica\Network\HTTPException\BadRequestException;
use Friendica\Network\HTTPException\NotFoundException;
}
if (!DBA::exists('contact', ['id' => $contact_id, 'uid' => local_user(), 'deleted' => false])) {
}
if (!DBA::exists('contact', ['id' => $contact_id, 'uid' => local_user(), 'deleted' => false])) {
'hidden' => $hidden,
'notify_new_posts' => $notify,
'fetch_further_information' => $fetch_further_information,
'hidden' => $hidden,
'notify_new_posts' => $notify,
'fetch_further_information' => $fetch_further_information,
- if (DBA::isResult($r)) {
- info(DI::l10n()->t('Contact updated.') . EOL);
- } else {
- notice(DI::l10n()->t('Failed to update contact record.') . EOL);
+ if (!DBA::isResult($r)) {
+ notice(DI::l10n()->t('Failed to update contact record.'));
}
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id, 'uid' => local_user(), 'deleted' => false]);
}
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id, 'uid' => local_user(), 'deleted' => false]);
- $result = Model\Contact::createFromProbe($uid, $contact['url'], false, $contact['network']);
+ $user = Model\User::getById($contact['uid']);
+ $result = Model\Contact::createFromProbe($user, $contact['url'], false, $contact['network']);
if ($result['success']) {
DBA::update('contact', ['subhub' => 1], ['id' => $contact_id]);
if ($result['success']) {
DBA::update('contact', ['subhub' => 1], ['id' => $contact_id]);
self::blockContact($contact_id);
$blocked = Model\Contact::isBlockedByUser($contact_id, local_user());
self::blockContact($contact_id);
$blocked = Model\Contact::isBlockedByUser($contact_id, local_user());
self::ignoreContact($contact_id);
$ignored = Model\Contact::isIgnoredByUser($contact_id, local_user());
self::ignoreContact($contact_id);
$ignored = Model\Contact::isIgnoredByUser($contact_id, local_user());
$r = self::archiveContact($contact_id, $orig_record);
if ($r) {
$archived = (($orig_record['archive']) ? 0 : 1);
$r = self::archiveContact($contact_id, $orig_record);
if ($r) {
$archived = (($orig_record['archive']) ? 0 : 1);
'$hidden' => ['hidden', DI::l10n()->t('Hide this contact from others'), ($contact['hidden'] == 1), DI::l10n()->t('Replies/likes to your public posts <strong>may</strong> still be visible')],
'$notify' => ['notify', DI::l10n()->t('Notification for new posts'), ($contact['notify_new_posts'] == 1), DI::l10n()->t('Send a notification of every new post of this contact')],
'$fetch_further_information' => $fetch_further_information,
'$hidden' => ['hidden', DI::l10n()->t('Hide this contact from others'), ($contact['hidden'] == 1), DI::l10n()->t('Replies/likes to your public posts <strong>may</strong> still be visible')],
'$notify' => ['notify', DI::l10n()->t('Notification for new posts'), ($contact['notify_new_posts'] == 1), DI::l10n()->t('Send a notification of every new post of this contact')],
'$fetch_further_information' => $fetch_further_information,
- '$ffi_keyword_blacklist' => ['ffi_keyword_blacklist', DI::l10n()->t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], DI::l10n()->t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
+ '$ffi_keyword_denylist' => ['ffi_keyword_denylist', DI::l10n()->t('Keyword Deny List'), $contact['ffi_keyword_denylist'], DI::l10n()->t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
'$photo' => $contact['photo'],
'$name' => $contact['name'],
'$dir_icon' => $dir_icon,
'$photo' => $contact['photo'],
'$name' => $contact['name'],
'$dir_icon' => $dir_icon,
Model\Profile::load($a, '', $profiledata, true);
Model\Profile::load($a, '', $profiledata, true);
- $o .= Model\Contact::getPostsFromUrl($contact['url'], true, $update);
+
+ if ($contact['uid'] == 0) {
+ $o .= Model\Contact::getPostsFromId($contact['id'], true, $update);
+ } else {
+ $o .= Model\Contact::getPostsFromUrl($contact['url'], true, $update);
+ }
if (local_user() && in_array($profiledata['network'], Protocol::FEDERATED)) {
$profiledata['remoteconnect'] = DI::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);
}
Model\Profile::load($a, '', $profiledata, true);
if (local_user() && in_array($profiledata['network'], Protocol::FEDERATED)) {
$profiledata['remoteconnect'] = DI::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);
}
Model\Profile::load($a, '', $profiledata, true);