diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2021-07-18 19:57:53 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-18 19:57:53 +0900 |
| commit | 04e27e160e92d006db59d3285aeaf5c535e82861 (patch) | |
| tree | 74ca0a576f7f498bffce5195736d0561a05178fd /src/server/api/endpoints/admin | |
| parent | API AuthenticateでDB接続エラーなどが発生するとログアウト... (diff) | |
| download | sharkey-04e27e160e92d006db59d3285aeaf5c535e82861.tar.gz sharkey-04e27e160e92d006db59d3285aeaf5c535e82861.tar.bz2 sharkey-04e27e160e92d006db59d3285aeaf5c535e82861.zip | |
認証の修正 (#7597)
* authenticateのキャッシュを廃止
* 凍結ユーザーがサインイン出来てしまうのを修正
* 凍結ユーザーはストリーミング接続出来ないように
* 他人のアクセストークンはrevoke出来ないように, 正常削除を待機するように
* ユーザー/アクセストークンを無効化したらストリーミングを切断するように
* Revert TODO
* ストリーミングterminateは、ユーザー削除後に行うように
* signinでsuspendは別のエラーにする
* トークン再生成後のストリーミング切断は少し待つように
* サスペンド後のストリーミング切断はローカルユーザーのみに
Diffstat (limited to 'src/server/api/endpoints/admin')
| -rw-r--r-- | src/server/api/endpoints/admin/suspend-user.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/api/endpoints/admin/suspend-user.ts b/src/server/api/endpoints/admin/suspend-user.ts index 9f3c8eb6f8..912d6a5162 100644 --- a/src/server/api/endpoints/admin/suspend-user.ts +++ b/src/server/api/endpoints/admin/suspend-user.ts @@ -6,6 +6,7 @@ import { Users, Followings, Notifications } from '../../../../models'; import { User } from '../../../../models/entities/user'; import { insertModerationLog } from '../../../../services/insert-moderation-log'; import { doPostSuspend } from '../../../../services/suspend-user'; +import { publishUserEvent } from '@/services/stream'; export const meta = { tags: ['admin'], @@ -43,6 +44,11 @@ export default define(meta, async (ps, me) => { targetId: user.id, }); + // Terminate streaming + if (Users.isLocalUser(user)) { + publishUserEvent(user.id, 'terminate', {}); + } + (async () => { await doPostSuspend(user).catch(e => {}); await unFollowAll(user).catch(e => {}); |