/.well-known 周りをいい感じに (#4141)

* Enhance /.well-known and their friends

* Fix bug
This commit is contained in:
Acid Chicken (硫酸鶏) 2019-02-05 17:42:55 +09:00 committed by GitHub
parent 2f4434b0d8
commit 9dd06a7621
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 202 additions and 89 deletions

View file

@ -1,4 +1,6 @@
export default (acct: string) => {
import Acct from './type';
export default (acct: string): Acct => {
if (acct.startsWith('@')) acct = acct.substr(1);
const split = acct.split('@', 2);
return { username: split[0], host: split[1] || null };