1 import { WEBSERVER } from '@server/initializers/constants'
3 function handleToNameAndHost (handle: string) {
4 let [ name, host ] = handle.split('@')
5 if (host === WEBSERVER.HOST) host = null
7 return { name, host, handle }
10 function handlesToNameAndHost (handles: string[]) {
11 return handles.map(h => handleToNameAndHost(h))