diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-02-17 23:41:47 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-17 23:41:47 +0900 |
| commit | 1d5a54ff6f74569fa89c4083301d9b01eb80ad29 (patch) | |
| tree | 0695f8ee6942b49236b880bb228be45b26282e90 /src/server/api/endpoints/i | |
| parent | Fix #4300 (#4304) (diff) | |
| download | sharkey-1d5a54ff6f74569fa89c4083301d9b01eb80ad29.tar.gz sharkey-1d5a54ff6f74569fa89c4083301d9b01eb80ad29.tar.bz2 sharkey-1d5a54ff6f74569fa89c4083301d9b01eb80ad29.zip | |
ハッシュタグでユーザー検索できるように (#4298)
* ハッシュタグでユーザー検索できるように
* :art:
* Increase limit
* リモートユーザーも表示
* Fix bug
* Fix bug
* Improve performance
Diffstat (limited to 'src/server/api/endpoints/i')
| -rw-r--r-- | src/server/api/endpoints/i/update.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 6ae63c52db..b3ec53223f 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -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 |