mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-29 15:28:09 +09:00
[API] Beef up the recommendation algorithm
This commit is contained in:
parent
a4736a6c71
commit
e2dc4467b6
@ -1,6 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Module dependencies
|
* Module dependencies
|
||||||
*/
|
*/
|
||||||
|
const ms = require('ms');
|
||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import User from '../../models/user';
|
import User from '../../models/user';
|
||||||
import serialize from '../../serializers/user';
|
import serialize from '../../serializers/user';
|
||||||
@ -29,6 +30,9 @@ module.exports = (params, me) => new Promise(async (res, rej) => {
|
|||||||
.find({
|
.find({
|
||||||
_id: {
|
_id: {
|
||||||
$nin: followingIds
|
$nin: followingIds
|
||||||
|
},
|
||||||
|
last_used_at: {
|
||||||
|
$gte: new Date(Date.now() - ms('7days'))
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
limit: limit,
|
limit: limit,
|
||||||
|
Loading…
Reference in New Issue
Block a user