securize accounName name pattern

This commit is contained in:
Nicolas Constant 2018-11-03 14:39:32 -04:00
parent 2ffad41ea6
commit a5fcc29c90
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,8 @@ export class ToolsService {
console.warn(`accountName ${accountName}`);
console.warn(result);
if(accountName[0] === '@') accountName = accountName.substr(1);
const foundAccount = result.accounts.filter(
x => x.acct.toLowerCase() === accountName.toLowerCase()
|| x.acct.toLowerCase() === accountName.toLowerCase().split('@')[0]