mirror of
https://github.com/yinxin630/fiora.git
synced 2026-06-04 21:03:18 +08:00
* Refactor as monorepo * Fix server * Fix client * Fix not fire message event error * Fix CI scripts * Update install doc * Fix bin * Refactored the directory structure to the final version * Fix ts type error * Fix lint error * Fix unit test error * Update .gitignore
13 lines
334 B
TypeScript
13 lines
334 B
TypeScript
/**
|
|
* Combina two users id as frind id
|
|
* The result has nothing to do with the order of the parameters
|
|
* @param userId1 user id
|
|
* @param userId2 user id
|
|
*/
|
|
export default function getFriendId(userId1: string, userId2: string) {
|
|
if (userId1 < userId2) {
|
|
return userId1 + userId2;
|
|
}
|
|
return userId2 + userId1;
|
|
}
|