mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-24 01:39:06 +01:00
Change mentions regex to support punycode
This commit is contained in:
parent
295e15205e
commit
16e0cc9471
@ -96,6 +96,7 @@ import XModalWindow from "@/components/MkModalWindow.vue";
|
||||
import * as os from "@/os";
|
||||
import { defaultStore } from "@/store";
|
||||
import { i18n } from "@/i18n";
|
||||
import { toASCII } from "punycode/";
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "ok", selected: misskey.entities.UserDetailed): void;
|
||||
@ -117,7 +118,7 @@ const search = () => {
|
||||
}
|
||||
os.api("users/search-by-username-and-host", {
|
||||
username: username,
|
||||
host: host,
|
||||
host: toASCII(host),
|
||||
limit: 10,
|
||||
detail: false,
|
||||
}).then((_users) => {
|
||||
|
@ -3,7 +3,7 @@ import getCaretCoordinates from "textarea-caret";
|
||||
import { toASCII } from "punycode/";
|
||||
import { popup } from "@/os";
|
||||
|
||||
const mentionRegex = /@(?<user>[a-zA-Z0-9_]+|$)@?(?<host>[a-zA-Z0-9-.]+)?$/g;
|
||||
const mentionRegex = /@(?<user>[a-zA-Z0-9_]+|$)@?(?<host>[\S]+)?$/g;
|
||||
|
||||
export class Autocomplete {
|
||||
private suggestion: {
|
||||
|
Loading…
Reference in New Issue
Block a user