Skip to content

Commit dc18768

Browse files
committed
fix conflicts
2 parents d4ffd00 + e45d1f5 commit dc18768

File tree

20 files changed

+178
-30
lines changed

20 files changed

+178
-30
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ react-native link
1515
在 Podfile 中添加如下代码:
1616

1717
```
18-
pod 'JPushRN', :path => '../node_modules/jpush-react-native'
18+
pod 'JMessageRN', :path => '../node_modules/jmessage-react-plugin'
1919
```
2020

2121
终端执行如下指令:

android/src/io/jchat/android/JMessageModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ public void forwardMessage(ReadableMap map, final Callback success, final Callba
15021502
options.setCustomNotificationEnabled(optionMap.getBoolean("isCustomNotificationEnabled"));
15031503
}
15041504
if (optionMap.hasKey("notificationTitle")) {
1505-
options.setNotificationText(optionMap.getString("notificationTitle"));
1505+
options.setNotificationTitle(optionMap.getString("notificationTitle"));
15061506
}
15071507
if (optionMap.hasKey("notificationText")) {
15081508
options.setNotificationText(optionMap.getString("notificationText"));

android/src/io/jchat/android/utils/JMessageUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void gotResult(int status, String desc) {
8282
optionMap.getBoolean("isCustomNotificationEnabled"));
8383
}
8484
if (optionMap.hasKey("notificationTitle")) {
85-
options.setNotificationText(optionMap.getString("notificationTitle"));
85+
options.setNotificationTitle(optionMap.getString("notificationTitle"));
8686
}
8787
if (optionMap.hasKey("notificationText")) {
8888
options.setNotificationText(optionMap.getString("notificationText"));

example/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"babel-plugin-transform-decorators-legacy": "^1.3.4",
1010
"babel-preset-react-native-stage-0": "^1.0.1",
1111
"jcore-react-native": "^ 1.2.9",
12-
"jmessage-react-plugin": "^2.4.1",
12+
"jmessage-react-plugin": "^2.4.2",
1313
"mobx": "^3.4.1",
1414
"mobx-react": "^4.3.5",
1515
"react": "^16.0.0",

ios/RCTJMessageModule/JMessage.framework/Headers/JMSGConstants.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,18 @@ typedef NS_ENUM(NSInteger, JMSGPlatformType) {
212212
kJMSGPlatformTypeWeb = 16,
213213
};
214214

215+
/*!
216+
* 群成员类型
217+
*/
218+
typedef NS_ENUM(NSInteger, JMSGGroupMemberType) {
219+
/// 普通成员
220+
kJMSGGroupMemberTypeOrdinary = 0,
221+
/// 群主
222+
kJMSGGroupMemberTypeOwner = 1,
223+
/// 管理员
224+
kJMSGGroupMemberTypeAdmin = 2,
225+
};
226+
215227
/*!
216228
* 发送消息透传的的类型
217229
*/
@@ -280,6 +292,8 @@ typedef NS_ENUM(NSInteger, JMSGEventNotificationType) {
280292
kJMSGEventNotificationGroupTypeChange = 83,
281293
/// 事件类型: 解散群组
282294
kJMSGEventNotificationDissolveGroup = 11001,
295+
/// 事件类型: 群组成员上限变更
296+
kJMSGEventNotificationGroupMaxMemberCountChange = 11002,
283297

284298

285299
// 好友相关事件

ios/RCTJMessageModule/JMessage.framework/Headers/JMSGConversation.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#import <Foundation/Foundation.h>
1313
#import <JMessage/JMSGConstants.h>
1414
#import <JMessage/JMSGUser.h>
15+
#import <JMessage/JMSGGroup.h>
1516

1617
@class JMSGMessage;
1718
@class JMSGAbstractContent;
@@ -190,7 +191,7 @@ JMSG_ASSUME_NONNULL_BEGIN
190191
/*!
191192
* @abstract 获取当前所有会话的未读消息的总数
192193
*
193-
* @discussion 获取所有会话未读消息总数
194+
* @discussion 获取所有会话未读消息总数,开启免打扰的会话未读数不会加入计数
194195
*/
195196
+ (NSNumber *)getAllUnreadCount;
196197

@@ -519,7 +520,7 @@ JMSG_ASSUME_NONNULL_BEGIN
519520
- (void)avatarData:(JMSGAsyncDataHandler)handler;
520521

521522
/*!
522-
* @abstract 获取会话头像的本地路径(仅限单聊)
523+
* @abstract 获取会话头像的本地路径
523524
*
524525
* @return 返回本地路,返回值只有在下载完成之后才有意义
525526
*/

ios/RCTJMessageModule/JMessage.framework/Headers/JMSGEventContent.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#import <Foundation/Foundation.h>
1313
#import <JMessage/JMSGAbstractContent.h>
1414

15-
16-
1715
/*!
1816
* 事件类型的消息内容
1917
*
@@ -40,6 +38,11 @@
4038
*/
4139
- (NSString *JMSG_NULLABLE)getEventFromUsername;
4240

41+
/*!
42+
* @abstract 获取事件发起者
43+
*/
44+
- (JMSGUser *JMSG_NULLABLE)getEventFromUser;
45+
4346
/*!
4447
* @abstract 获取事件作用对象用户名列表
4548
* @return 返回类型为 NSArray,数组成员为事件作用对象的用户名
@@ -49,6 +52,16 @@
4952
*/
5053
- (NSArray *JMSG_NULLABLE)getEventToUsernameList;
5154

55+
/*!
56+
* @abstract 获取事件作用对象列表。
57+
*/
58+
- (NSArray <__kindof JMSGUser *>*JMSG_NULLABLE)getEventToUserList;
59+
60+
/*!
61+
* @abstract 获取事件自定义字段
62+
*/
63+
- (NSString *JMSG_NULLABLE)getEventCustom;
64+
5265
/*!
5366
@abstract 展示此事件的文本描述
5467

ios/RCTJMessageModule/JMessage.framework/Headers/JMSGGroup.h

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,32 @@
1414

1515
@class JMSGUser,JMSGApplyJoinGroupEvent;
1616

17+
/*!
18+
* 群成员信息类
19+
*
20+
* #### 可通过 [JMSGGroup memberInfoList:]和 [JMSGGroup memberInfoWithUsername:appkey:] 两个接口获取群成员信息
21+
*/
22+
@interface JMSGGroupMemberInfo : NSObject
23+
24+
/// 成员用户信息
25+
@property(nonatomic, strong, readonly) JMSGUser *JMSG_NULLABLE user;
26+
/// 入群时间
27+
@property(nonatomic, assign, readonly) UInt64 ctime;
28+
/// 群昵称
29+
@property(nonatomic, strong, readonly) NSString *JMSG_NULLABLE groupNickname;
30+
/// 群组成员的身份
31+
@property(nonatomic, assign, readonly) JMSGGroupMemberType memberType;
32+
33+
/*!
34+
* @abstract 获取群成员的展示名
35+
*
36+
* @discussion 展示优先级:群昵称 > 好友备注(user.noteName) > 用户昵称(user.nickname) > 用户名(user.username)
37+
*
38+
* #### 同接口 [JMSGGroup memberDisplayName:] 相同效果
39+
*/
40+
- (NSString *JMSG_NULLABLE)displayName;
41+
@end
42+
1743
/*!
1844
* 群信息类(此类仅用于修改群信息、创建群、群信息展示)
1945
*
@@ -39,6 +65,8 @@
3965
@property(nonatomic, assign, readwrite) JMSGGroupType groupType;
4066
/** 群组人数上限*/
4167
@property(nonatomic, strong, readonly) NSString *JMSG_NONNULL maxMemberCount;
68+
/** 群组创建时间*/
69+
@property(nonatomic, assign, readonly) SInt64 ctime;
4270

4371
@end
4472

@@ -343,10 +371,10 @@ JMSG_ASSUME_NONNULL_BEGIN
343371
* @discussion 一般在群组详情界面调用此接口,展示群组的所有成员列表。
344372
* 本接口只是在本地请求成员列表,不会发起服务器端请求。
345373
*/
346-
- (NSArray JMSG_GENERIC(__kindof JMSGUser *)*)memberArray;
374+
- (NSArray JMSG_GENERIC(__kindof JMSGUser *)*)memberArray __attribute__((deprecated("Use - memberInfoList:")));
347375

348376
/*!
349-
* @abstract 获取群组成员列表(异步接口
377+
* @abstract 获取群组成员列表(建议使用 [JMSGGroup memberInfoList:] 接口
350378
*
351379
* @handler 成员列表. NSArray 里成员类型是 JMSGUser.
352380
*
@@ -355,6 +383,27 @@ JMSG_ASSUME_NONNULL_BEGIN
355383
*/
356384
- (void)memberArrayWithCompletionHandler:(JMSGCompletionHandler JMSG_NULLABLE)handler;
357385

386+
/*!
387+
* @abstract 获取所有群成员信息列表
388+
*
389+
* @handler 成员列表. 类型为 NSArray,里面元素为 JMSGGroupMemberInfo.
390+
*
391+
* @discussion 返回数据中的 JMSGGroupMemberInfo 包含了成员 user 信息、入群时间、群昵称等
392+
*/
393+
- (void)memberInfoList:(JMSGCompletionHandler JMSG_NULLABLE)handler;
394+
395+
/*!
396+
* @abstract 获取单个群成员信息
397+
*
398+
* @param username 目标用户 username
399+
* @param appkey 目标用户 appkey,不传则默认本应用 appkey
400+
* @return 群成员信息对象
401+
*
402+
* @discussion JMSGGroupMemberInfo 包含了成员 user 信息、入群时间、群昵称等
403+
*/
404+
- (JMSGGroupMemberInfo *JMSG_NULLABLE)memberInfoWithUsername:(NSString *JMSG_NONNULL)username
405+
appkey:(NSString *JMSG_NULLABLE)appkey;
406+
358407
/*!
359408
* @abstract 修改群组类型
360409
*
@@ -392,12 +441,36 @@ JMSG_ASSUME_NONNULL_BEGIN
392441
*/
393442
- (void)setIsShield:(BOOL)isShield handler:(JMSGCompletionHandler)handler;
394443

444+
/*!
445+
* @abstract 设置成员群昵称
446+
*
447+
* @param nickname 群昵称
448+
* @param username 目标用户的 username
449+
* @param appKey 目标用户的 appKey,若传入空则默认使用本应用appKey
450+
*/
451+
- (void)setGroupNickname:(NSString *JMSG_NULLABLE)nickname
452+
username:(NSString *JMSG_NONNULL)username
453+
appKey:(NSString *JMSG_NULLABLE)appKey
454+
handler:(JMSGCompletionHandler JMSG_NULLABLE)handler;
455+
456+
/*!
457+
* @abstract 获取成员的群昵称
458+
*
459+
* @param username 群成员 username
460+
* @patam appKey 群成员 appKey,不传则默认是本应用 appkey
461+
* @return 群昵称
462+
*
463+
* @discussion 还可以通过获取群成员信息 JMSGGroupMemberInfo 来获取群昵称
464+
*/
465+
- (NSString *JMSG_NULLABLE)groupNicknameWithUsername:(NSString *)username
466+
appKey:(NSString *JMSG_NULLABLE)appKey;
467+
395468
/*!
396469
* @abstract 群成员禁言设置
397470
*
398471
* @param isSilence 是否禁言, YES:是 NO: 否
399-
* @param username 带设置的用户的 username
400-
* @param appKey 带设置的用户的 appKey,若传入空则默认使用本应用appKey
472+
* @param username 待设置的用户的 username
473+
* @param username 带待设置的用户的 appKey,若传入空则默认使用本应用appKey
401474
* @param handler 结果回调
402475
*
403476
* @discussion 注意: 目前 SDK 只支持群主设置群里某个用户禁言
@@ -594,6 +667,15 @@ JMSG_ASSUME_NONNULL_BEGIN
594667
*/
595668
- (NSString *JMSG_NULLABLE)largeAvatarLocalPath;
596669

670+
/*!
671+
* @abstract 获取群成员的展示名
672+
*
673+
* @param memberUid 群成员的 uid(即:[JMSGUser uid])
674+
*
675+
* @discussion 展示优先级:群昵称 > 好友备注(user.noteName) > 用户昵称(user.nickname) > 用户名(user.username)
676+
*/
677+
- (NSString *)memberDisplayName:(UInt64)memberUid;
678+
597679
/*!
598680
* @abstract 获取群组的展示名
599681
*

ios/RCTJMessageModule/JMessage.framework/Headers/JMSGGroupDelegate.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,16 @@
6666
@optional
6767
- (void)onReceiveGroupAdminApprovalEvent:(JMSGGroupAdminApprovalEvent *)event;
6868

69+
/*!
70+
* @abstract 群成员群昵称变更通知
71+
*
72+
* @param events 群成员昵称变更事件列表
73+
*
74+
* @discussion 如果是离线事件,SDK 会将所有的修改记录加入数组上抛。事件具体相关属性请查看 JMSGGroupNicknameChangeEvent 类
75+
*
76+
* @since 3.7.0
77+
*/
78+
@optional
79+
- (void)onReceiveGroupNicknameChangeEvents:(NSArray<__kindof JMSGGroupNicknameChangeEvent*>*)events;
80+
6981
@end

0 commit comments

Comments
 (0)