Merge commit '3944b12b5eec8c6ae4666ec922411b32b3442dd6' into glitch-soc/merge-upstream
This commit is contained in:
commit
f685c953e5
3 files changed
+62
-11
No files matched your search
@@ -2,8 +2,13 @@ import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import { ACCOUNT_LOOKUP_FAIL } from '../actions/accounts';
|
||||
import { importAccounts } from '../actions/accounts_typed';
|
||||
import { domain } from '../initial_state';
|
||||
|
||||
export const normalizeForLookup = str => str.toLowerCase();
|
||||
export const normalizeForLookup = str => {
|
||||
str = str.toLowerCase();
|
||||
const trailingIndex = str.indexOf(`@${domain.toLowerCase()}`);
|
||||
return (trailingIndex > 0) ? str.slice(0, trailingIndex) : str;
|
||||
};
|
||||
|
||||
const initialState = ImmutableMap();
|
||||
|
||||
|
||||
Reference in new issue
Block a user