diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-03-30 01:58:17 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-03-30 01:58:17 -0400 |
| commit | 4ae26e6e185e52ac186ac10ccd4eda7718bf6e26 (patch) | |
| tree | 8d556072f3876f0bfbab9d24e7cd209ca6bd091a /packages/frontend/src/utility/get-user-menu.ts | |
| parent | restore following feed deck UI (diff) | |
| parent | New Crowdin updates (#15721) (diff) | |
| download | sharkey-4ae26e6e185e52ac186ac10ccd4eda7718bf6e26.tar.gz sharkey-4ae26e6e185e52ac186ac10ccd4eda7718bf6e26.tar.bz2 sharkey-4ae26e6e185e52ac186ac10ccd4eda7718bf6e26.zip | |
Merge branch 'misskey-develop' into merge/2025-03-24
Diffstat (limited to 'packages/frontend/src/utility/get-user-menu.ts')
| -rw-r--r-- | packages/frontend/src/utility/get-user-menu.ts | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/packages/frontend/src/utility/get-user-menu.ts b/packages/frontend/src/utility/get-user-menu.ts index 9693197ab4..8eb2ef3ec9 100644 --- a/packages/frontend/src/utility/get-user-menu.ts +++ b/packages/frontend/src/utility/get-user-menu.ts @@ -361,12 +361,18 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${user.host}`; os.post({ specified: user, initialText: `${canonical} ` }); }, - }, { - type: 'link', - icon: 'ti ti-messages', - text: i18n.ts._chat.chatWithThisUser, - to: `/chat/user/${user.id}`, - }, { type: 'divider' }, { + }); + + if ($i.policies.canChat && user.canChat && user.host == null) { + menuItems.push({ + type: 'link', + icon: 'ti ti-messages', + text: i18n.ts._chat.chatWithThisUser, + to: `/chat/user/${user.id}`, + }); + } + + menuItems.push({ type: 'divider' }, { icon: user.isMuted ? 'ti ti-eye' : 'ti ti-eye-off', text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute, action: toggleMute, |