Merge pull request #1135 from annando/profile-update

CatAvatar: Use new function to perform a profile update
This commit is contained in:
Hypolite Petovan 2021-06-16 10:23:11 -04:00 committed by GitHub
commit 91eefebab4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,7 @@ use Friendica\Database\DBA;
use Friendica\DI; use Friendica\DI;
use Friendica\Model\Contact; use Friendica\Model\Contact;
use Friendica\Model\Photo; use Friendica\Model\Photo;
use Friendica\Model\Profile;
use Friendica\Network\HTTPException\NotFoundException; use Friendica\Network\HTTPException\NotFoundException;
define("CATAVATAR_SIZE", 256); define("CATAVATAR_SIZE", 256);
@ -98,12 +99,7 @@ function catavatar_addon_settings_post(App $a, &$s)
Contact::updateSelfFromUserID(local_user(), true); Contact::updateSelfFromUserID(local_user(), true);
// Update global directory in background // Update global directory in background
$url = DI::baseUrl()->get() . '/profile/' . $a->user['nickname']; Profile::publishUpdate(local_user());
if ($url && strlen(DI::config()->get('system', 'directory'))) {
Worker::add(PRIORITY_LOW, 'Directory', $url);
}
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
info(DI::l10n()->t('Meow!')); info(DI::l10n()->t('Meow!'));
return; return;