Skip to content

Commit e6464aa

Browse files
committed
udpate index.js update for chatRoom
1 parent f7426a6 commit e6464aa

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

index.js

Lines changed: 18 additions & 5 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
*/

0 commit comments

Comments
 (0)