1
0
mirror of https://github.com/NicolasConstant/sengi synced 2025-01-21 13:20:48 +01:00

check instance when searching account

This commit is contained in:
Nicolas Constant 2019-07-07 11:29:30 -04:00
parent 2d4243f0dc
commit 6786c95d91
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688

View File

@ -49,8 +49,9 @@ export class ToolsService {
if(accountName[0] === '@') accountName = accountName.substr(1);
const foundAccount = result.accounts.find(
x => x.acct.toLowerCase() === accountName.toLowerCase()
|| x.acct.toLowerCase().split('@')[0] === accountName.toLowerCase().split('@')[0]
x => (x.acct.toLowerCase() === accountName.toLowerCase()
|| x.acct.toLowerCase().split('@')[0] === accountName.toLowerCase().split('@')[0])
&& x.url.replace('https://', '').split('/')[0] === accountName.toLowerCase().split('@')[1]
);
return foundAccount;
});