1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 14:28:49 +09:00

enhance(backend): ハッシュタグのランキングをローカルユーザーに限定する (MisskeyIO#570)

This commit is contained in:
まっちゃとーにゅ 2024-03-27 07:25:56 +09:00 committed by GitHub
parent 9bd82d07b2
commit a89d6b912c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,8 +56,10 @@ export class HashtagService {
public async updateHashtag(user: { id: MiUser['id']; host: MiUser['host']; }, tag: string, isUserAttached = false, inc = true) { public async updateHashtag(user: { id: MiUser['id']; host: MiUser['host']; }, tag: string, isUserAttached = false, inc = true) {
tag = normalizeForSearch(tag); tag = normalizeForSearch(tag);
// TODO: サンプリング if (this.userEntityService.isLocalUser(user)) {
this.updateHashtagsRanking(tag, user.id); // TODO: サンプリング
this.updateHashtagsRanking(tag, user.id);
}
const index = await this.hashtagsRepository.findOneBy({ name: tag }); const index = await this.hashtagsRepository.findOneBy({ name: tag });