Skip to content

Commit d10f561

Browse files
KenChoiKenChoi
authored andcommitted
Merge branch 'dev' of github.com:jpush/jmessage-react-plugin into dev
2 parents a16a0b2 + 6841c16 commit d10f561

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

index.js

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,11 @@ export default class JMessage {
672672
* 创建聊天会话。
673673
*
674674
* @param {object} params = {
675-
* 'type': String, // 'single' / 'group'
675+
* 'type': String, // 'single' / 'group' / 'chatRoom'
676676
* 'groupId': String, // 目标群组 id。
677677
* 'username': String, // 目标用户名。
678678
* 'appKey': String, // 目标用户所属 AppKey。
679+
* 'roomId': String, // 聊天室 id.
679680
* }
680681
* @param {function} success = function (conversation) {} // 以参数形式返回聊天会话对象。
681682
* @param {function} error = function ({'code': '错误码', 'description': '错误信息'}) {}
@@ -688,10 +689,11 @@ export default class JMessage {
688689
* 删除聊天会话,同时会删除本地聊天记录。
689690
*
690691
* @param {object} params = {
691-
* 'type': String, // 'single' / 'group'
692+
* 'type': String, // 'single' / 'group' / 'chatRoom'
692693
* 'groupId': String, // 目标群组 id。
693694
* 'username': String, // 目标用户名。
694695
* 'appKey': String, // 目标用户所属 AppKey。
696+
* 'roomId': String, // 聊天室 id.
695697
* }
696698
* @param {function} success = function () {}
697699
* @param {function} error = function ({'code': '错误码', 'description': '错误信息'}) {}
@@ -731,9 +733,10 @@ export default class JMessage {
731733

732734
/**
733735
* @param {object} params = {
734-
* 'type': String, // 'single' / 'group'
736+
* 'type': String, // 'single' / 'group' / 'chatRoom'
735737
* 'groupId': String, // 目标群组 id。
736738
* 'username': String, // 目标用户名。
739+
* 'roomId': String, // 聊天室 id.
737740
* 'appKey': String, // 目标用户所属 AppKey。
738741
* }
739742
* @param {function} success = function (conversation) {} // 以参数形式返回聊天会话对象。
@@ -1044,9 +1047,19 @@ export default class JMessage {
10441047
JMessageModule.getChatRoomInfos(param, success, error);
10451048
}
10461049

1050+
/**
1051+
* 查询指定 roomId 聊天室的所有者
1052+
* @param {object} param = {roomId: String}
1053+
* @param {function} success = function({userInfo})
1054+
* @param {function} error = function ({'code': '错误码', 'description': '错误信息'}) {}
1055+
*/
1056+
static getChatRoomOwner(param, success, error) {
1057+
JMessageModule.getChatRoomOwner(param, success, error);
1058+
}
1059+
10471060
/**
10481061
* 进入聊天室,进入后才能收到聊天室信息及发言
1049-
* @param {String} roomId
1062+
* @param {object} param = {roomId: String}
10501063
* @param {function} success = function({conversation})
10511064
* @param {function} error = function ({'code': '错误码', 'description': '错误信息'}) {}
10521065
*/
@@ -1056,7 +1069,7 @@ export default class JMessage {
10561069

10571070
/**
10581071
* 离开聊天室
1059-
* @param {String} roomId
1072+
* @param {object} param = {roomId: String}
10601073
* @param {function} success = function(0)
10611074
* @param {function} error = function ({'code': '错误码', 'description': '错误信息'}) {}
10621075
*/
@@ -1073,24 +1086,6 @@ export default class JMessage {
10731086
JMessageModule.getChatRoomConversationList(callback);
10741087
}
10751088

1076-
/**
1077-
* 删除聊天室会话,同时删除本地相关缓存文件。成功返回 true,失败返回 false
1078-
* @param {String} roomId
1079-
* @param {function} callback = function(bool)
1080-
*/
1081-
static deleteChatRoomConversation(roomId, callback) {
1082-
JMessageModule.deleteChatRoomConversation(roomId, callback);
1083-
}
1084-
1085-
/**
1086-
* 创建聊天室会话,如果本地已存在,则不会重新创建,直接返回该会话
1087-
* @param {String} roomId
1088-
* @param {function} callback = function({Conversation})
1089-
*/
1090-
static createChatRoomConversation(roomId, callback) {
1091-
JMessageModule.createChatRoomConversation(roomId, callback);
1092-
}
1093-
10941089
/**
10951090
* 接收聊天室消息
10961091
* @param {function} listener = function([{Message}])

0 commit comments

Comments
 (0)