Skip to content

Commit

Permalink
[Fix] group signaling.
Browse files Browse the repository at this point in the history
  • Loading branch information
std-s committed Jul 11, 2022
1 parent d57cf73 commit 6085574
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
13 changes: 10 additions & 3 deletions OpenIMSDK/Interface/OIMManager+Signaling.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ NS_ASSUME_NONNULL_BEGIN
"inviteeUserIDList": ["userID"], //只有一个元素
"roomID": "", // 选填
"timeout": 30,// 默认30s
"mediaType": "video", / "audio"
"mediaType": "video", / "audio" // 默认"video"
}
* 邀请群里某些人加入音视频
{
"inviteeUserIDList": ["useID1", "userID2"],
"groupID": "groupID",
"groupID": "groupID", // 必填
"roomID": "", // 选填
"timeout": 30,// 默认30s
"mediaType": "video", / "audio"
"mediaType": "video", / "audio" // 默认"video"
}
* @param offlinePushInfo 离线push消息
*/
Expand All @@ -37,6 +37,13 @@ NS_ASSUME_NONNULL_BEGIN
onSuccess:(nullable OIMSignalingResultCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

/*
* 邀请群里某些人加入音视频 - 只在于参数的设置
*/
- (void)signalingInviteInGroup:(OIMInvitationInfo *)invitation
offlinePushInfo:(OIMOfflinePushInfo * _Nullable)offlinePushInfo
onSuccess:(nullable OIMSignalingResultCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

/*
* 同意某人音视频邀请
Expand Down
17 changes: 13 additions & 4 deletions OpenIMSDK/Interface/OIMManager+Signaling.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,19 @@ - (void)signalingInvite:(OIMInvitationInfo *)invitation
}

info.offlinePushInfo = offlinePushInfo;

NSLog(@"====invite json:%@", info.mj_JSONString);

Open_im_sdkSignalingInvite(callback, [self operationId], info.mj_JSONString);

if (invitation.sessionType == OIMConversationTypeGroup) {
Open_im_sdkSignalingInviteInGroup(callback, [self operationId], info.mj_JSONString);
} else {
Open_im_sdkSignalingInvite(callback, [self operationId], info.mj_JSONString);
}
}

- (void)signalingInviteInGroup:(OIMInvitationInfo *)invitation
offlinePushInfo:(OIMOfflinePushInfo *)offlinePushInfo
onSuccess:(OIMSignalingResultCallback)onSuccess
onFailure:(OIMFailureCallback)onFailure {
[self signalingInvite:invitation offlinePushInfo:offlinePushInfo onSuccess:onSuccess onFailure:onFailure];
}

- (void)signalingAccept:(OIMSignalingInfo *)invitation
Expand Down

0 comments on commit 6085574

Please sign in to comment.