diff --git a/locales/index.d.ts b/locales/index.d.ts
index 966c2224f..f8c497165 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -4894,7 +4894,7 @@ export interface Locale extends ILocale {
*/
"readConfirmText": ParameterizedString<"title">;
/**
- * 特に新規ユーザーのUXを損ねる可能性が高いため、ストック情報ではなくフロー情報の掲示にお知らせを使用することを推奨します。
+ * 特に新規ユーザーのUXを損ねる可能性が高いため、常時掲示するための情報ではなく、即時性が求められる情報の掲示のためにお知らせを使用することを推奨します。
*/
"shouldNotBeUsedToPresentPermanentInfo": string;
/**
diff --git a/packages/frontend/src/components/MkUserSelectDialog.vue b/packages/frontend/src/components/MkUserSelectDialog.vue
index d7bd73aa8..184636110 100644
--- a/packages/frontend/src/components/MkUserSelectDialog.vue
+++ b/packages/frontend/src/components/MkUserSelectDialog.vue
@@ -16,7 +16,11 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.selectUser }}
-
+
+ {{ i18n.ts.username }}
+ @
+
+
{{ i18n.ts.username }}
@
@@ -66,7 +70,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { defaultStore } from '@/store.js';
import { i18n } from '@/i18n.js';
import { $i } from '@/account.js';
-import { hostname } from '@/config.js';
+import { host as currentHost, hostname } from '@/config.js';
const emit = defineEmits<{
(ev: 'ok', selected: Misskey.entities.UserDetailed): void;
@@ -76,6 +80,7 @@ const emit = defineEmits<{
const props = defineProps<{
includeSelf?: boolean;
+ localOnly?: boolean;
}>();
const username = ref('');
@@ -92,7 +97,7 @@ function search() {
}
misskeyApi('users/search-by-username-and-host', {
username: username.value,
- host: host.value,
+ host: props.localOnly ? '.' : host.value,
limit: 10,
detail: false,
}).then(_users => {
@@ -125,11 +130,18 @@ function cancel() {
onMounted(() => {
misskeyApi('users/show', {
userIds: defaultStore.state.recentlyUsedUsers,
- }).then(users => {
- if (props.includeSelf && users.find(x => $i ? x.id === $i.id : true) == null) {
- recentUsers.value = [$i!, ...users];
+ }).then(foundUsers => {
+ const _users = foundUsers.filter((u) => {
+ if (props.localOnly) {
+ return u.host == null;
+ } else {
+ return true;
+ }
+ });
+ if (props.includeSelf && _users.find(x => $i ? x.id === $i.id : true) == null) {
+ recentUsers.value = [$i!, ..._users];
} else {
- recentUsers.value = users;
+ recentUsers.value = _users;
}
});
});
@@ -138,7 +150,7 @@ onMounted(() => {