MCPcopy Create free account
hub / github.com/msgbyte/tailchat / fetchUserInfo

Function fetchUserInfo

client/shared/model/user.ts:289–304  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

287 * @param userId 用户ID
288 */
289export async function fetchUserInfo(userId: string): Promise<UserBaseInfo> {
290 if (
291 builtinUserInfo[userId] &&
292 typeof builtinUserInfo[userId] === 'function'
293 ) {
294 return builtinUserInfo[userId]();
295 }
296
297 if (!isObjectId(userId)) {
298 throw new Error(`Invalid userId: ${userId}`);
299 }
300
301 const userInfo = await _fetchUserInfo(userId);
302
303 return userInfo;
304}
305
306const _fetchUserOnlineStatus = createAutoMergedRequest<string[], boolean[]>(
307 createAutoSplitRequest(

Callers 1

getCachedUserInfoFunction · 0.90

Calls 1

isObjectIdFunction · 0.90

Tested by

no test coverage detected