mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 19:37:34 -07:00
use actually correct webfinger check
This commit is contained in:
parent
25be3bbe2d
commit
066f8550b6
1 changed files with 3 additions and 1 deletions
|
@ -186,13 +186,15 @@ export default hasConfig
|
||||||
} else if (term.startsWith("from:")) {
|
} else if (term.startsWith("from:")) {
|
||||||
let user = term.slice(5);
|
let user = term.slice(5);
|
||||||
|
|
||||||
|
if (user.length === 0) return null;
|
||||||
|
|
||||||
// Cut off leading @, those aren't saved in the DB
|
// Cut off leading @, those aren't saved in the DB
|
||||||
if (user.charAt(0) === "@") {
|
if (user.charAt(0) === "@") {
|
||||||
user = user.slice(1);
|
user = user.slice(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine if we got a webfinger address or a single username
|
// Determine if we got a webfinger address or a single username
|
||||||
if (user.split("@").length > 0) {
|
if (user.split("@").length > 1) {
|
||||||
let splitUser = user.split("@");
|
let splitUser = user.split("@");
|
||||||
|
|
||||||
let domain = splitUser.pop();
|
let domain = splitUser.pop();
|
||||||
|
|
Loading…
Reference in a new issue