@@ -293,7 +293,7 @@ JMessage.createGroup({ name: 'group_name', desc: 'group_desc' },
293293
294294### createSendMessage
295295
296- 创建消息,创建好消息后需要调用 [ sendMessage] ( #sendmessage ) 来发送消息。如果需要状态更新(发送中到发送完成)推荐这种方式。
296+ 创建消息,创建好消息后需要调用 [ sendMessage] ( #sendmessage ) 来发送消息。如果需要状态更新(发送中到发送完成)推荐这种方式,聊天室不支持该接口 。
297297
298298#### 示例
299299
@@ -306,11 +306,10 @@ JMessage.createSendMessage({type: 'group', groupId: 'group id', appKey: 'appkey'
306306
307307#### 参数说明
308308
309- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
309+ - type: 会话类型。可以为 'single' 或 'group'。
310310- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
311311- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
312312- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
313- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
314313- messageType: 不同的消息类型需要不同的字段。
315314 - messageType = text 时 ` text ` 为必填。
316315 - messageType = image 时 ` path ` 为必填。
@@ -346,11 +345,10 @@ JMessage.createSendMessage({type: 'single', username: 'username', appKey: 'appke
346345#### 参数
347346
348347- id: 创建好的 message id。
349- - type: 会话类型。可以为 'single' 或 'group'或 'chatRoom' 。
348+ - type: 会话类型。可以为 'single' 或 'group'。
350349- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
351350- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
352351- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
353- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
354352
355353
356354- messageSendingOptions: 消息发送配置参数。支持的属性:
@@ -438,11 +436,10 @@ JMessage.sendImageMessage({ type: 'group', groupId: 'target_group_id', path: 'im
438436
439437#### 参数说明
440438
441- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
439+ - type: 会话类型。可以为 'single' 或 'group'。
442440- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
443441- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
444442- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
445- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
446443- path: 本地图片的绝对路径。格式分别类似为:
447444 - Android:` /storage/emulated/0/DCIM/Camera/IMG_20160526_130223.jpg `
448445 - iOS:` /var/mobile/Containers/Data/Application/7DC5CDFF-6581-4AD3-B165-B604EBAB1250/tmp/photo.jpg `
@@ -486,11 +483,10 @@ JMessage.sendVoiceMessage({ type: 'group', groupId: 'target_group_id', path: 'vo
486483
487484#### 参数说明
488485
489- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
486+ - type: 会话类型。可以为 'single' 或 'group'。
490487- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
491488- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
492489- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
493- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
494490- path: 本地音频文件的绝对路径。
495491- extras: 自定义键值对,value 必须为字符串类型。
496492- messageSendingOptions: 消息发送配置参数(只对 Android 生效)。支持的属性:
@@ -532,11 +528,10 @@ JMessage.sendCustomMessage({ type: 'group', groupId: 'target_group_id', path: 'v
532528
533529#### 参数说明
534530
535- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
531+ - type: 会话类型。可以为 'single' 或 'group'。
536532- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
537533- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
538534- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
539- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
540535- customObject: 自定义键值对,` value ` 必须为字符串类型。
541536- messageSendingOptions: 消息发送配置参数(只对 Android 生效)。支持的属性:
542537 - isShowNotification: 接收方是否针对此次消息发送展示通知栏通知。默认为 ` true ` 。
@@ -579,11 +574,10 @@ JMessage.sendLocationMessage({ type: 'group', groupId: 'target_group_id',
579574
580575#### 参数说明
581576
582- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
577+ - type: 会话类型。可以为 'single' 或 'group'。
583578- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
584579- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
585580- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
586- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
587581- latitude: 纬度。
588582- longitude: 经度。
589583- scale: 地图缩放比例。
@@ -662,11 +656,10 @@ JMessage.retractMessage({type: 'single', username: 'username', appKey: 'appKey',
662656
663657#### 参数说明
664658
665- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
659+ - type: 会话类型。可以为 'single' 或 'group'。
666660- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
667661- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
668662- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
669- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
670663- messageId: 要撤回的消息 id。
671664
672665### getHistoryMessages
@@ -689,11 +682,10 @@ JMessage.getHistoryMessages({ type: 'single', username: 'username',
689682
690683#### 参数说明
691684
692- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
685+ - type: 会话类型。可以为 'single' 或 'group'。
693686- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
694687- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
695688- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
696- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
697689- from: 第一条消息对应的下标,起始为 0。
698690- limit: 消息数。当 from = 0 并且 limit = -1 时,返回所有的历史消息。
699691
@@ -718,11 +710,10 @@ JMessage.downloadOriginalImage({ type: 'single', username: 'username',
718710
719711#### 参数说明
720712
721- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
713+ - type: 会话类型。可以为 'single' 或 'group' 。
722714- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
723715- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
724716- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
725- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
726717- messageId: 图片消息 id。
727718
728719### downloadVoiceFile
@@ -746,11 +737,10 @@ JMessage.downloadVoiceFile({ type: 'single', username: 'username',
746737
747738#### 参数说明
748739
749- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
740+ - type: 会话类型。可以为 'single' 或 'group'。
750741- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
751742- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
752743- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
753- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
754744- messageId: 语音消息 id。
755745
756746### downloadFile
@@ -774,11 +764,10 @@ JMessage.downloadFile({ type: 'single', username: 'username',
774764
775765#### 参数说明
776766
777- - type: 会话类型。可以为 'single' 或 'group' 或 'chatRoom' 。
767+ - type: 会话类型。可以为 'single' 或 'group'。
778768- username: 对方用户的用户名。当 ` type ` 为 'single' 时,` username ` 为必填。
779769- appKey: 对方用户所属应用的 AppKey。如果不填,默认为当前应用。
780770- groupId: 对象群组 id。当 ` type ` 为 'group' 时,` groupId ` 为必填。
781- - roomId: 对象聊天室 id。当 ` type ` 为 'chatRoom' 时,` roomId ` 为必填。
782771- messageId: 文件消息 id。
783772
784773## 会话
@@ -938,6 +927,8 @@ JMessage.resetUnreadMessageCount({ type: 'single', username: 'username', appKey:
938927
939928## 聊天室
940929
930+ 聊天室的消息不存数据库,不支持获取历史消息,只支持文本消息。进入聊天室即可接收该聊天室的消息,退出则不在接收。
931+
941932### getChatRoomListByApp
942933
943934查询当前 AppKey 下的聊天室信息。
0 commit comments