New field to show the day of the last activity
This commit is contained in:
parent
fbcc56d42d
commit
f905220923
8 changed files with 50 additions and 4 deletions
|
@ -22,8 +22,11 @@
|
|||
namespace Friendica\Security;
|
||||
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
|
@ -100,6 +103,14 @@ class OAuth
|
|||
return [];
|
||||
}
|
||||
Logger::debug('Token found', $token);
|
||||
|
||||
User::updateLastActivity($token['uid']);
|
||||
|
||||
// Regularly update suggestions
|
||||
if (Contact\Relation::areSuggestionsOutdated($token['uid'])) {
|
||||
Worker::add(Worker::PRIORITY_MEDIUM, 'UpdateSuggestions', $token['uid']);
|
||||
}
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue