Move FSuggest to depository

This commit is contained in:
Philipp 2021-10-21 22:57:13 +02:00 committed by Hypolite Petovan
parent 4a50a83437
commit 82a6c78033
13 changed files with 236 additions and 464 deletions

View file

@ -68,16 +68,15 @@ class FriendSuggest extends BaseModule
$note = Strings::escapeHtml(trim($_POST['note'] ?? ''));
$suggest = DI::fsuggest()->insert([
'uid' => local_user(),
'cid' => $cid,
'name' => $contact['name'],
'url' => $contact['url'],
'request' => $contact['request'],
'photo' => $contact['avatar'],
'note' => $note,
'created' => DateTimeFormat::utcNow()
]);
$suggest = DI::fsuggest()->save(DI::fsuggestFactory()->createNew(
local_user(),
$cid,
$contact['name'],
$contact['url'],
$contact['request'],
$contact['avatar'],
$note
));
Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::SUGGESTION, $suggest->id);