Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/search-utils.js
// @flow | // @flow | ||||
import SearchIndex from './search-index.js'; | import SearchIndex from './search-index.js'; | ||||
import { | import { | ||||
userIsMember, | userIsMember, | ||||
threadMemberHasPermission, | threadMemberHasPermission, | ||||
getContainingThreadID, | getContainingThreadID, | ||||
} from './thread-utils.js'; | } from './thread-utils.js'; | ||||
import genesis from '../facts/genesis.js'; | import genesis from '../facts/genesis.js'; | ||||
import { userRelationshipStatus } from '../types/relationship-types.js'; | import { userRelationshipStatus } from '../types/relationship-types.js'; | ||||
import { | import { threadPermissions } from '../types/thread-permission-types.js'; | ||||
type ThreadInfo, | import { type ThreadType, threadTypes } from '../types/thread-types-enum.js'; | ||||
type ThreadType, | import { type ThreadInfo } from '../types/thread-types.js'; | ||||
threadTypes, | |||||
threadPermissions, | |||||
} from '../types/thread-types.js'; | |||||
import type { AccountUserInfo, UserListItem } from '../types/user-types.js'; | import type { AccountUserInfo, UserListItem } from '../types/user-types.js'; | ||||
const notFriendNotice = 'not friend'; | const notFriendNotice = 'not friend'; | ||||
function getPotentialMemberItems( | function getPotentialMemberItems( | ||||
text: string, | text: string, | ||||
userInfos: { +[id: string]: AccountUserInfo }, | userInfos: { +[id: string]: AccountUserInfo }, | ||||
searchIndex: SearchIndex, | searchIndex: SearchIndex, | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |