ハッシュタグでユーザー検索できるように (#4298)

* ハッシュタグでユーザー検索できるように

* 🎨

* Increase limit

* リモートユーザーも表示

* Fix bug

* Fix bug

* Improve performance
This commit is contained in:
syuilo 2019-02-17 23:41:47 +09:00 committed by GitHub
parent 03e2c7eec6
commit 1d5a54ff6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 366 additions and 56 deletions

View file

@ -11,6 +11,7 @@ import { parse, parsePlain } from '../../../../mfm/parse';
import extractEmojis from '../../../../misc/extract-emojis';
import extractHashtags from '../../../../misc/extract-hashtags';
import * as langmap from 'langmap';
import { updateHashtag } from '../../../../services/update-hashtag';
export const meta = {
desc: {
@ -221,6 +222,10 @@ export default define(meta, (ps, user, app) => new Promise(async (res, rej) => {
updates.emojis = emojis;
updates.tags = tags;
// ハッシュタグ更新
for (const tag of tags) updateHashtag(user, tag, true, true);
for (const tag of (user.tags || []).filter(x => !tags.includes(x))) updateHashtag(user, tag, true, false);
}
//#endregion