feat: add base methods

This commit is contained in:
Bloomingg
2023-12-06 20:04:34 +08:00
parent 7033508803
commit 9d20806d51
15 changed files with 1810 additions and 578 deletions

View File

@@ -4,6 +4,7 @@ import {
AccessFriendParams,
SearchFriendParams,
RemarkFriendParams,
AddFriendParams,
} from '@/types/params';
import {
@@ -35,12 +36,12 @@ export function setupFriendModule(openIMSDK: OpenIMSDK) {
);
}),
addFriend: (userID: string, opid = uuidV4()) =>
addFriend: (params: AddFriendParams, opid = uuidV4()) =>
new Promise<BaseResponse<void>>((resolve, reject) => {
openIMSDK.libOpenIMSDK.add_friend(
openIMSDK.baseCallbackWrap<void>(resolve, reject),
opid,
userID
JSON.stringify(params)
);
}),