From 6786c95d912909f03cd08093fc01034f47a90304 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Sun, 7 Jul 2019 11:29:30 -0400 Subject: [PATCH] check instance when searching account --- src/app/services/tools.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/services/tools.service.ts b/src/app/services/tools.service.ts index 5f0f4721..efca9c0d 100644 --- a/src/app/services/tools.service.ts +++ b/src/app/services/tools.service.ts @@ -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; });