1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-23 22:56:49 +09:00

Feat: リモートユーザーの更新をできるように (#12172)

* Feat: リモートユーザーの更新をできるように

Signed-off-by: mattyatea <mattyacocacora0@gmail.com>

* Update packages/frontend/src/scripts/get-user-menu.ts

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

* Update packages/frontend/src/scripts/get-user-menu.ts

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

---------

Signed-off-by: mattyatea <mattyacocacora0@gmail.com>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
まっちゃてぃー 2023-10-29 16:14:48 +09:00 committed by GitHub
parent 0fc36d11d7
commit 2da55f70a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,12 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
return !confirm.canceled;
}
async function userInfoUpdate() {
os.apiWithDialog('federation/update-remote-user', {
userId: user.id,
});
}
async function invalidateFollow() {
if (!await getConfirmed(i18n.ts.breakFollowConfirm)) return;
@ -330,6 +336,14 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
}]);
}
if (user.host !== null) {
menu = menu.concat([null, {
icon: 'ti ti-refresh',
text: i18n.ts.updateRemoteUser,
action: userInfoUpdate,
}]);
}
if (defaultStore.state.devMode) {
menu = menu.concat([null, {
icon: 'ti ti-id',