Allow Arabic and Cyrillic usernames/community names (fixes #1764) (#4083)

* Allow Arabic and Cyrillic usernames/community names (fixes #1764)

* update comment
This commit is contained in:
Nutomic
2023-10-24 22:25:52 +02:00
committed by GitHub
parent 722d9efc13
commit d55bd2f2bc
4 changed files with 46 additions and 9 deletions
+18
View File
@@ -129,3 +129,21 @@ test("Requests with invalid auth should be treated as unauthenticated", async ()
let posts = invalid_auth.getPosts(form);
expect((await posts).posts).toBeDefined();
});
test("Create user with Arabic name", async () => {
let userRes = await registerUser(alpha, "تجريب");
expect(userRes.jwt).toBeDefined();
let user = new LemmyHttp(alphaUrl, {
headers: { Authorization: `Bearer ${userRes.jwt ?? ""}` },
});
let site = await getSite(user);
expect(site.my_user).toBeDefined();
if (!site.my_user) {
throw "Missing site user";
}
apShortname = `@${site.my_user.local_user_view.person.name}@lemmy-alpha:8541`;
let alphaPerson = (await resolvePerson(alpha, apShortname)).person;
expect(alphaPerson).toBeDefined();
});