From e43535a88a538987e4280eb7f24004018300ae5f Mon Sep 17 00:00:00 2001 From: std-s <> Date: Tue, 19 Jul 2022 14:41:56 +0800 Subject: [PATCH 1/3] [Update] add enum value. --- OpenIMSDK/Model/OIMGroupInfo.h | 2 +- OpenIMSDK/Utils/OIMModelDefine.h | 54 ++++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/OpenIMSDK/Model/OIMGroupInfo.h b/OpenIMSDK/Model/OIMGroupInfo.h index f964f34..a8a8232 100644 --- a/OpenIMSDK/Model/OIMGroupInfo.h +++ b/OpenIMSDK/Model/OIMGroupInfo.h @@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) NSInteger createTime; @property (nonatomic, assign) NSInteger memberCount; /// 群状态:0正常,1被封,2解散,3禁言 -@property (nonatomic, assign) NSInteger status; +@property (nonatomic, assign) OIMGroupStatus status; @property (nonatomic, copy) NSString *creatorUserID; @property (nonatomic, assign) NSInteger needVerification; @property (nonatomic, assign) NSInteger lookMemberInfo; diff --git a/OpenIMSDK/Utils/OIMModelDefine.h b/OpenIMSDK/Utils/OIMModelDefine.h index fdcc3ff..e8dae69 100644 --- a/OpenIMSDK/Utils/OIMModelDefine.h +++ b/OpenIMSDK/Utils/OIMModelDefine.h @@ -13,22 +13,24 @@ * 消息类型 */ typedef NS_ENUM(NSInteger, OIMMessageContentType) { - OIMMessageContentTypeText = 101, /// 文本消息 - OIMMessageContentTypeImage = 102, /// 图片消息 - OIMMessageContentTypeAudio = 103, /// 语音消息 - OIMMessageContentTypeVideo = 104, /// 视频消息 - OIMMessageContentTypeFile = 105, /// 文件消息 - OIMMessageContentTypeAt = 106, /// @消息 - OIMMessageContentTypeMerge = 107, /// 合并消息 - OIMMessageContentTypeCard = 108, /// 名片消息 - OIMMessageContentTypeLocation = 109, /// 位置消息 - OIMMessageContentTypeCustom = 110, /// 自定义消息 - OIMMessageContentTypeRevokeReciept = 111, /// 撤回消息回执 - OIMMessageContentTypeC2CReciept = 112, /// C2C已读回执 - OIMMessageContentTypeTyping = 113, /// 正在输入状态 - OIMMessageContentTypeQuote = 114, /// 引用消息 - OIMMessageContentTypeFace = 115, /// 动图消息 - OIMMessageContentTypeAdvancedRevoke = 118, /// 撤回消息类型-新 + OIMMessageContentTypeText = 101, /// 文本消息 + OIMMessageContentTypeImage = 102, /// 图片消息 + OIMMessageContentTypeAudio = 103, /// 语音消息 + OIMMessageContentTypeVideo = 104, /// 视频消息 + OIMMessageContentTypeFile = 105, /// 文件消息 + OIMMessageContentTypeAt = 106, /// @消息 + OIMMessageContentTypeMerge = 107, /// 合并消息 + OIMMessageContentTypeCard = 108, /// 名片消息 + OIMMessageContentTypeLocation = 109, /// 位置消息 + OIMMessageContentTypeCustom = 110, /// 自定义消息 + OIMMessageContentTypeRevokeReciept = 111, /// 撤回消息回执 + OIMMessageContentTypeC2CReciept = 112, /// C2C已读回执 + OIMMessageContentTypeTyping = 113, /// 正在输入状态 + OIMMessageContentTypeQuote = 114, /// 引用消息 + OIMMessageContentTypeFace = 115, /// 动图消息 + OIMMessageContentTypeGroupHasReadReceipt = 116, /// 群聊已读回执 + OIMMessageContentTypeAdvancedText = 117, /// Advanced消息 + OIMMessageContentTypeAdvancedRevoke = 118, /// 撤回消息类型-新 /// 以下皆是通知消息枚举 OIMMessageContentTypeFriendAppApproved = 1201, /// 同意加好友申请通知 OIMMessageContentTypeFriendAppRejected = 1202, /// 拒绝加好友申请通知 @@ -51,6 +53,16 @@ typedef NS_ENUM(NSInteger, OIMMessageContentType) { OIMMessageContentTypeMemberInvited = 1509, /// 邀请群成员通知 OIMMessageContentTypeMemberEnter = 1510, /// 群成员进群通知 OIMMessageContentTypeDismissGroup = 1511, /// 解散群通知 + OIMMessageContentTypeGroupMemberMutedNotification = 1512, + OIMMessageContentTypeGroupMemberCancelMutedNotification = 1513, + OIMMessageContentTypeGroupMutedNotification = 1514, + OIMMessageContentTypeGroupCancelMutedNotification = 1515, + OIMMessageContentTypeGroupMemberInfoSetNotification = 1516, + OIMMessageContentTypeGroupMemberSetToAdminNotification = 1517, + OIMMessageContentTypeGroupMemberSetToOrdinaryUserNotification = 1518, + OIMMessageContentTypeSuperGroupUpdateNotification = 1651, + OIMMessageContentTypeConversationPrivateChatNotification = 1701, + OIMMessageContentTypeOrganizationChangedNotification = 1801, OIMMessageContentTypeIsPrivateMessage = 1701, /// 阅后即焚通知 }; @@ -148,6 +160,16 @@ typedef NS_ENUM(NSInteger, OIMGroupType) { OIMGroupTypeWorking = 2, /// 工作群 }; +/** + 群状态 + */ +typedef NS_ENUM(NSInteger, OIMGroupStatus) { + OIMGroupStatusOk = 0, /// 正常 + OIMGroupStatusBanChat = 1, /// 被封 + OIMGroupStatusDismissed = 2,/// 解散 + OIMGroupStatusMuted = 3, /// 禁言 +}; + /** 入群方式 */ From e2a927020e8a930856e02eaea1599a44d4ed24d9 Mon Sep 17 00:00:00 2001 From: std-s <> Date: Tue, 19 Jul 2022 16:02:27 +0800 Subject: [PATCH 2/3] [Fix] new revoke callback field. --- Example/OpenIMSDKiOS/OPENIMSDKViewController.m | 2 +- OpenIMSDK/Callbacker/OIMCallbacker.h | 4 ++-- OpenIMSDK/Interface/OIMManager+Group.h | 4 ++-- OpenIMSDK/Model/OIMGroupMemberInfo.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Example/OpenIMSDKiOS/OPENIMSDKViewController.m b/Example/OpenIMSDKiOS/OPENIMSDKViewController.m index ea5fbf2..1b02283 100644 --- a/Example/OpenIMSDKiOS/OPENIMSDKViewController.m +++ b/Example/OpenIMSDKiOS/OPENIMSDKViewController.m @@ -314,7 +314,7 @@ - (void)callback { NSLog(@"onRecvGroupReadReceipt:%@", msgReceiptList); } onRecvNewMessage:^(OIMMessageInfo * _Nullable message) { - } onNewRecvMessageRevoked:^(NSArray * _Nullable msgRovoked) { + } onNewRecvMessageRevoked:^(OIMMessageRevoked * _Nullable msgRovoked) { }]; } diff --git a/OpenIMSDK/Callbacker/OIMCallbacker.h b/OpenIMSDK/Callbacker/OIMCallbacker.h index ff47b2e..8b6ad29 100644 --- a/OpenIMSDK/Callbacker/OIMCallbacker.h +++ b/OpenIMSDK/Callbacker/OIMCallbacker.h @@ -62,7 +62,7 @@ typedef void (^OIMMessagesInfoCallback)(NSArray * _Nullable m typedef void (^OIMMessageSearchCallback)(OIMSearchResultInfo * _Nullable result); typedef void (^OIMReceiptCallback)(NSArray * _Nullable msgReceiptList); -typedef void (^OIMRevokedCallback)(NSArray * _Nullable msgRovoked); +typedef void (^OIMRevokedCallback)(OIMMessageRevoked * _Nullable msgRovoked); typedef void (^OIMSignalingInvitationCallback)(OIMSignalingInfo * _Nullable result); typedef void (^OIMSignalingResultCallback)(OIMInvitationResultInfo * _Nullable result); @@ -270,7 +270,7 @@ typedef void (^OIMMomentsInfoCallback)(NSArray * _Nullable it */ - (void)onRecvMessageRevoked:(NSString *)msgID; -- (void)onNewRecvMessageRevoked:(NSString *)messageRevoked; +- (void)onNewRecvMessageRevoked:(OIMMessageRevoked *)messageRevoked; @end diff --git a/OpenIMSDK/Interface/OIMManager+Group.h b/OpenIMSDK/Interface/OIMManager+Group.h index c9033eb..cee99b4 100644 --- a/OpenIMSDK/Interface/OIMManager+Group.h +++ b/OpenIMSDK/Interface/OIMManager+Group.h @@ -192,7 +192,7 @@ NS_ASSUME_NONNULL_BEGIN onFailure:(nullable OIMFailureCallback)onFailure; /* - * 静音或取消禁言某群成员 mutedSeconds为0时取消禁言 + * 禁言或取消禁言某群成员 mutedSeconds为0时取消禁言 */ - (void)changeGroupMemberMute:(NSString *)groupID userID:(NSString *)userID @@ -201,7 +201,7 @@ NS_ASSUME_NONNULL_BEGIN onFailure:(nullable OIMFailureCallback)onFailure; /* - * 静音或取消禁言某群 + * 禁言或取消禁言某群 */ - (void)changeGroupMute:(NSString *)groupID isMute:(BOOL)isMute diff --git a/OpenIMSDK/Model/OIMGroupMemberInfo.h b/OpenIMSDK/Model/OIMGroupMemberInfo.h index 73fd412..dbf8d06 100644 --- a/OpenIMSDK/Model/OIMGroupMemberInfo.h +++ b/OpenIMSDK/Model/OIMGroupMemberInfo.h @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) OIMJoinType joinSource; // 操作者id @property (nonatomic, nullable, copy) NSString *operatorUserID; -// 禁言时间s +// 被禁言结束时间戳s @property (nonatomic, assign) NSTimeInterval muteEndTime; @property (nonatomic, copy) NSString *inviterUserID; From a75e8a5e6db125e2fe012dbcc94ad49288525eb2 Mon Sep 17 00:00:00 2001 From: std-s <> Date: Mon, 25 Jul 2022 10:56:37 +0800 Subject: [PATCH 3/3] [Update] add get advance message list. --- .../OpenIMSDKiOS.xcodeproj/project.pbxproj | 52 +++++++++---------- OpenIMSDK/Callbacker/OIMCallbacker.h | 2 + OpenIMSDK/Interface/OIMManager+Message.h | 8 +++ OpenIMSDK/Interface/OIMManager+Message.m | 12 +++++ OpenIMSDK/Model/OIMAttachedInfoElem.h | 1 + OpenIMSDK/Model/OIMSearchParam.h | 6 +++ OpenIMSDK/Model/OIMSearchParam.m | 4 ++ OpenIMSDK/Model/OIMSearchResultInfo.h | 14 ++++- OpenIMSDK/Model/OIMSearchResultInfo.m | 4 ++ 9 files changed, 76 insertions(+), 27 deletions(-) diff --git a/Example/OpenIMSDKiOS.xcodeproj/project.pbxproj b/Example/OpenIMSDKiOS.xcodeproj/project.pbxproj index 2f0e1ff..dd70a4f 100644 --- a/Example/OpenIMSDKiOS.xcodeproj/project.pbxproj +++ b/Example/OpenIMSDKiOS.xcodeproj/project.pbxproj @@ -12,8 +12,6 @@ 17CADD2827C7227F0069C80E /* voice_test.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 17CADD2627C7227F0069C80E /* voice_test.m4a */; }; 17CADD2A27C738630069C80E /* video_test.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 17CADD2927C738630069C80E /* video_test.mp4 */; }; 17CADD2C27C7781C0069C80E /* file_test.zip in Resources */ = {isa = PBXBuildFile; fileRef = 17CADD2B27C7781C0069C80E /* file_test.zip */; }; - 2D9C01C7B174B431FA412A16 /* Pods_OpenIMSDKiOS_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A1F5DD09F8C1F2631B1166B /* Pods_OpenIMSDKiOS_Example.framework */; }; - 3DD407C03CE2C81D9D7A112E /* Pods_OpenIMSDKiOS_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D52325FDCDD29B63882184E /* Pods_OpenIMSDKiOS_Tests.framework */; }; 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; @@ -27,8 +25,10 @@ 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; + 6FA0112F1274CB6E2354C758 /* Pods_OpenIMSDKiOS_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32F128D1470B06032A984108 /* Pods_OpenIMSDKiOS_Tests.framework */; }; 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; + DE5E135E2DAD817A8EFF7D39 /* Pods_OpenIMSDKiOS_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46D633C11696D9551823A379 /* Pods_OpenIMSDKiOS_Example.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,14 +42,16 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 05B9BEF429A580E59A85290C /* Pods-OpenIMSDKiOS_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenIMSDKiOS_Example.debug.xcconfig"; path = "Target Support Files/Pods-OpenIMSDKiOS_Example/Pods-OpenIMSDKiOS_Example.debug.xcconfig"; sourceTree = ""; }; + 0C4FBE61DD83E19F3E2AFCF8 /* Pods-OpenIMSDKiOS_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenIMSDKiOS_Example.debug.xcconfig"; path = "Target Support Files/Pods-OpenIMSDKiOS_Example/Pods-OpenIMSDKiOS_Example.debug.xcconfig"; sourceTree = ""; }; 17918D0527BC8F380040C924 /* OPENIMSDKTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OPENIMSDKTableViewCell.h; sourceTree = ""; }; 17918D0627BC8F380040C924 /* OPENIMSDKTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OPENIMSDKTableViewCell.m; sourceTree = ""; }; 17CADD2527C7227F0069C80E /* photo_test.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo_test.jpeg; sourceTree = ""; }; 17CADD2627C7227F0069C80E /* voice_test.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = voice_test.m4a; sourceTree = ""; }; 17CADD2927C738630069C80E /* video_test.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = video_test.mp4; sourceTree = ""; }; 17CADD2B27C7781C0069C80E /* file_test.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = file_test.zip; sourceTree = ""; }; - 2BB1836A648652266E0E8D67 /* Pods-OpenIMSDKiOS_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenIMSDKiOS_Tests.debug.xcconfig"; path = "Target Support Files/Pods-OpenIMSDKiOS_Tests/Pods-OpenIMSDKiOS_Tests.debug.xcconfig"; sourceTree = ""; }; + 2F5C85EAF2917B9B7EE7FAE5 /* Pods-OpenIMSDKiOS_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenIMSDKiOS_Tests.release.xcconfig"; path = "Target Support Files/Pods-OpenIMSDKiOS_Tests/Pods-OpenIMSDKiOS_Tests.release.xcconfig"; sourceTree = ""; }; + 32F128D1470B06032A984108 /* Pods_OpenIMSDKiOS_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OpenIMSDKiOS_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 46D633C11696D9551823A379 /* Pods_OpenIMSDKiOS_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OpenIMSDKiOS_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58A195388D20070C39A /* OpenIMSDKiOS_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenIMSDKiOS_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -69,12 +71,10 @@ 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; - 6D52325FDCDD29B63882184E /* Pods_OpenIMSDKiOS_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OpenIMSDKiOS_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 8A1F5DD09F8C1F2631B1166B /* Pods_OpenIMSDKiOS_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OpenIMSDKiOS_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BA3265BA6222E998D20796CC /* Pods-OpenIMSDKiOS_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenIMSDKiOS_Example.release.xcconfig"; path = "Target Support Files/Pods-OpenIMSDKiOS_Example/Pods-OpenIMSDKiOS_Example.release.xcconfig"; sourceTree = ""; }; - F4E0D93B0A25D0B5AFB09DA0 /* Pods-OpenIMSDKiOS_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenIMSDKiOS_Tests.release.xcconfig"; path = "Target Support Files/Pods-OpenIMSDKiOS_Tests/Pods-OpenIMSDKiOS_Tests.release.xcconfig"; sourceTree = ""; }; + B0099331627CECA50F92C42B /* Pods-OpenIMSDKiOS_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenIMSDKiOS_Tests.debug.xcconfig"; path = "Target Support Files/Pods-OpenIMSDKiOS_Tests/Pods-OpenIMSDKiOS_Tests.debug.xcconfig"; sourceTree = ""; }; + F19969F18161B255B85AA5C4 /* Pods-OpenIMSDKiOS_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenIMSDKiOS_Example.release.xcconfig"; path = "Target Support Files/Pods-OpenIMSDKiOS_Example/Pods-OpenIMSDKiOS_Example.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -85,7 +85,7 @@ 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - 2D9C01C7B174B431FA412A16 /* Pods_OpenIMSDKiOS_Example.framework in Frameworks */, + DE5E135E2DAD817A8EFF7D39 /* Pods_OpenIMSDKiOS_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -96,7 +96,7 @@ 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, - 3DD407C03CE2C81D9D7A112E /* Pods_OpenIMSDKiOS_Tests.framework in Frameworks */, + 6FA0112F1274CB6E2354C758 /* Pods_OpenIMSDKiOS_Tests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -106,10 +106,10 @@ 544C9C856FBE08EA043EC01E /* Pods */ = { isa = PBXGroup; children = ( - 05B9BEF429A580E59A85290C /* Pods-OpenIMSDKiOS_Example.debug.xcconfig */, - BA3265BA6222E998D20796CC /* Pods-OpenIMSDKiOS_Example.release.xcconfig */, - 2BB1836A648652266E0E8D67 /* Pods-OpenIMSDKiOS_Tests.debug.xcconfig */, - F4E0D93B0A25D0B5AFB09DA0 /* Pods-OpenIMSDKiOS_Tests.release.xcconfig */, + 0C4FBE61DD83E19F3E2AFCF8 /* Pods-OpenIMSDKiOS_Example.debug.xcconfig */, + F19969F18161B255B85AA5C4 /* Pods-OpenIMSDKiOS_Example.release.xcconfig */, + B0099331627CECA50F92C42B /* Pods-OpenIMSDKiOS_Tests.debug.xcconfig */, + 2F5C85EAF2917B9B7EE7FAE5 /* Pods-OpenIMSDKiOS_Tests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -141,8 +141,8 @@ 6003F58F195388D20070C39A /* CoreGraphics.framework */, 6003F591195388D20070C39A /* UIKit.framework */, 6003F5AF195388D20070C39A /* XCTest.framework */, - 8A1F5DD09F8C1F2631B1166B /* Pods_OpenIMSDKiOS_Example.framework */, - 6D52325FDCDD29B63882184E /* Pods_OpenIMSDKiOS_Tests.framework */, + 46D633C11696D9551823A379 /* Pods_OpenIMSDKiOS_Example.framework */, + 32F128D1470B06032A984108 /* Pods_OpenIMSDKiOS_Tests.framework */, ); name = Frameworks; sourceTree = ""; @@ -206,11 +206,11 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "OpenIMSDKiOS_Example" */; buildPhases = ( - 3E5CB7774DB6A7ECCDD58FC2 /* [CP] Check Pods Manifest.lock */, + 627EE26D4E088426270CC30A /* [CP] Check Pods Manifest.lock */, 6003F586195388D20070C39A /* Sources */, 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, - ABCDE812A659A8D1C1DFF64F /* [CP] Embed Pods Frameworks */, + 7C12A7DC5F069E2875ABA0D8 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -225,7 +225,7 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "OpenIMSDKiOS_Tests" */; buildPhases = ( - 02150235D7ACF5864BD37507 /* [CP] Check Pods Manifest.lock */, + 3E6EC12A9568DBF85E827CFE /* [CP] Check Pods Manifest.lock */, 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, @@ -306,7 +306,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 02150235D7ACF5864BD37507 /* [CP] Check Pods Manifest.lock */ = { + 3E6EC12A9568DBF85E827CFE /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -328,7 +328,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 3E5CB7774DB6A7ECCDD58FC2 /* [CP] Check Pods Manifest.lock */ = { + 627EE26D4E088426270CC30A /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -350,7 +350,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - ABCDE812A659A8D1C1DFF64F /* [CP] Embed Pods Frameworks */ = { + 7C12A7DC5F069E2875ABA0D8 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -503,7 +503,7 @@ }; 6003F5C0195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 05B9BEF429A580E59A85290C /* Pods-OpenIMSDKiOS_Example.debug.xcconfig */; + baseConfigurationReference = 0C4FBE61DD83E19F3E2AFCF8 /* Pods-OpenIMSDKiOS_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -523,7 +523,7 @@ }; 6003F5C1195388D20070C39A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BA3265BA6222E998D20796CC /* Pods-OpenIMSDKiOS_Example.release.xcconfig */; + baseConfigurationReference = F19969F18161B255B85AA5C4 /* Pods-OpenIMSDKiOS_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -543,7 +543,7 @@ }; 6003F5C3195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2BB1836A648652266E0E8D67 /* Pods-OpenIMSDKiOS_Tests.debug.xcconfig */; + baseConfigurationReference = B0099331627CECA50F92C42B /* Pods-OpenIMSDKiOS_Tests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( @@ -568,7 +568,7 @@ }; 6003F5C4195388D20070C39A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F4E0D93B0A25D0B5AFB09DA0 /* Pods-OpenIMSDKiOS_Tests.release.xcconfig */; + baseConfigurationReference = 2F5C85EAF2917B9B7EE7FAE5 /* Pods-OpenIMSDKiOS_Tests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( diff --git a/OpenIMSDK/Callbacker/OIMCallbacker.h b/OpenIMSDK/Callbacker/OIMCallbacker.h index 8b6ad29..e8a5018 100644 --- a/OpenIMSDK/Callbacker/OIMCallbacker.h +++ b/OpenIMSDK/Callbacker/OIMCallbacker.h @@ -74,6 +74,8 @@ typedef void (^OIMDepartmentMemberAndSubInfoCallback)(OIMDepartmentMemberAndSubI typedef void (^OIMMomentsInfoCallback)(NSArray * _Nullable items); +typedef void (^OIMGetAdvancedHistoryMessageListCallback)(OIMGetAdvancedHistoryMessageListInfo * _Nullable result); + /// IMSDK 主核心回调 @protocol OIMSDKListener @optional diff --git a/OpenIMSDK/Interface/OIMManager+Message.h b/OpenIMSDK/Interface/OIMManager+Message.h index 430ecfc..3bbe268 100644 --- a/OpenIMSDK/Interface/OIMManager+Message.h +++ b/OpenIMSDK/Interface/OIMManager+Message.h @@ -496,6 +496,14 @@ NS_ASSUME_NONNULL_BEGIN - (void)setGlobalRecvMessageOpt:(OIMReceiveMessageOpt)opt onSuccess:(nullable OIMSuccessCallback)onSuccess onFailure:(nullable OIMFailureCallback)onFailure; + +/** +* Advanced Message 系列使用 + @param opts lastMinSeq 是上一次拉取回调给的值,上下文,第二次拉取需要回传 + */ +- (void)getAdvancedHistoryMessageList:(OIMGetAdvancedHistoryMessageListParam *)opts + onSuccess:(nullable OIMGetAdvancedHistoryMessageListCallback)onSuccess + onFailure:(nullable OIMFailureCallback)onFailure; @end NS_ASSUME_NONNULL_END diff --git a/OpenIMSDK/Interface/OIMManager+Message.m b/OpenIMSDK/Interface/OIMManager+Message.m index e9b94fb..2b6c870 100644 --- a/OpenIMSDK/Interface/OIMManager+Message.m +++ b/OpenIMSDK/Interface/OIMManager+Message.m @@ -474,4 +474,16 @@ - (void)setGlobalRecvMessageOpt:(OIMReceiveMessageOpt)opt Open_im_sdkSetGlobalRecvMessageOpt(callback, [self operationId], opt); } +- (void)getAdvancedHistoryMessageList:(OIMGetAdvancedHistoryMessageListParam *)opts + onSuccess:(OIMGetAdvancedHistoryMessageListCallback)onSuccess + onFailure:(OIMFailureCallback)onFailure { + CallbackProxy *callback = [[CallbackProxy alloc]initWithOnSuccess:^(NSString * _Nullable data) { + if (onSuccess) { + onSuccess([OIMGetAdvancedHistoryMessageListInfo mj_objectWithKeyValues:data]); + } + } onFailure:onFailure]; + + Open_im_sdkGetAdvancedHistoryMessageList(callback, [self operationId], opts.mj_JSONString); +} + @end diff --git a/OpenIMSDK/Model/OIMAttachedInfoElem.h b/OpenIMSDK/Model/OIMAttachedInfoElem.h index ade8d11..e092c2e 100644 --- a/OpenIMSDK/Model/OIMAttachedInfoElem.h +++ b/OpenIMSDK/Model/OIMAttachedInfoElem.h @@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) NSInteger hasReadCount; +// 发送此条消息时的群人数 @property (nonatomic, assign) NSInteger groupMemberCount; @end diff --git a/OpenIMSDK/Model/OIMSearchParam.h b/OpenIMSDK/Model/OIMSearchParam.h index 4026f69..45c79a9 100644 --- a/OpenIMSDK/Model/OIMSearchParam.h +++ b/OpenIMSDK/Model/OIMSearchParam.h @@ -105,6 +105,12 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface OIMGetAdvancedHistoryMessageListParam : OIMGetMessageOptions + +@property (nonatomic, assign) NSInteger lastMinSeq; + +@end + // 查询组织架构使用 @interface OIMSearchOrganizationParam : NSObject diff --git a/OpenIMSDK/Model/OIMSearchParam.m b/OpenIMSDK/Model/OIMSearchParam.m index 1539415..f8519a1 100644 --- a/OpenIMSDK/Model/OIMSearchParam.m +++ b/OpenIMSDK/Model/OIMSearchParam.m @@ -33,6 +33,10 @@ @implementation OIMGetMessageOptions @end +@implementation OIMGetAdvancedHistoryMessageListParam + +@end + @implementation OIMSearchUserParam @end diff --git a/OpenIMSDK/Model/OIMSearchResultInfo.h b/OpenIMSDK/Model/OIMSearchResultInfo.h index 356a072..a29e055 100644 --- a/OpenIMSDK/Model/OIMSearchResultInfo.h +++ b/OpenIMSDK/Model/OIMSearchResultInfo.h @@ -40,10 +40,22 @@ NS_ASSUME_NONNULL_BEGIN /* * 搜索结果 */ -@property (nonatomic, strong) NSArray *searchResultItems; +@property (nonatomic, copy) NSArray *searchResultItems; @end +@interface OIMGetAdvancedHistoryMessageListInfo : NSObject +@property (nonatomic, assign) BOOL isEnd; + +@property (nonatomic, assign) NSInteger lastMinSeq; + +@property (nonatomic, assign) NSInteger errCode; + +@property (nonatomic, copy) NSString *errMsg; + +@property (nonatomic, copy) NSArray *messageList; + +@end NS_ASSUME_NONNULL_END diff --git a/OpenIMSDK/Model/OIMSearchResultInfo.m b/OpenIMSDK/Model/OIMSearchResultInfo.m index 008a7d8..5a24c75 100644 --- a/OpenIMSDK/Model/OIMSearchResultInfo.m +++ b/OpenIMSDK/Model/OIMSearchResultInfo.m @@ -26,3 +26,7 @@ + (NSDictionary *)mj_objectClassInArray } @end + +@implementation OIMGetAdvancedHistoryMessageListInfo + +@end