限定符和类型 | 方法和说明 |
---|---|
reactor.core.publisher.Mono<String> |
MessageApi.importChatGroupMessage(String from,
String to,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean isAckRead,
Long msgTimestamp,
Boolean needDownload)
导入群聊消息
API使用示例:
例如,导入带扩展字段的文本消息
EMTextMessage textMessage = new EMTextMessage().text("hello");
Set<EMKeyValue> exts = new HashSet<>();
exts.add(EMKeyValue.of("key", "value"));
try {
Instant time = Instant.parse("2021-05-20T18:00:00.631Z").minusMillis((TimeUnit.HOURS.toMillis(8)));
Long msgTimestamp = time.toEpochMilli();
String groupId = "18273849454"
String messageId = service.message()
.importChatGroupMessage("fromUserName", groupId,
textMessage, exts, true, msgTimestamp, false)
.block();
} catch (EMException e) {
e.getErrorCode();
e.getMessage();
}
|
reactor.core.publisher.Mono<String> |
MessageApi.importChatMessage(String from,
String to,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean isAckRead,
Long msgTimestamp,
Boolean needDownload)
导入单聊消息
API使用示例:
例如,导入带扩展字段的文本消息
EMTextMessage textMessage = new EMTextMessage().text("hello");
Set<EMKeyValue> exts = new HashSet<>();
exts.add(EMKeyValue.of("key", "value"));
try {
Instant time = Instant.parse("2021-05-20T18:00:00.631Z").minusMillis((TimeUnit.HOURS.toMillis(8)));
Long msgTimestamp = time.toEpochMilli();
String messageId = service.message()
.importChatMessage("fromUserName", "toUserName",
textMessage, exts, true, msgTimestamp, false)
.block();
} catch (EMException e) {
e.getErrorCode();
e.getMessage();
}
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions)
已过时。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice)
已过时。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType)
已过时。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
Boolean syncDevice)
已过时。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.sendMsg(String from,
Set<String> toGroups,
EMMessage message,
Set<String> toGroupUsers,
Set<EMKeyValue> extensions,
Boolean syncDevice)
指定群组用户发送消息,你可以向群组中指定的一个或多个成员发送消息,但单次仅支持指定一个群组。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.sendMsg(String from,
Set<String> toRooms,
EMMessage message,
Set<String> toRoomUsers,
Set<EMKeyValue> extensions,
Boolean syncDevice,
ChatroomMsgLevel chatroomMsgLevel)
指定聊天室用户发送消息,你可以向聊天室中指定的一个或多个成员发送消息,但单次仅支持指定一个聊天室。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.sendMsg(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions)
发送消息。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.sendMsg(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice)
发送消息。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.sendMsg(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType)
发送消息(只投递在线消息)。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.sendMsg(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
Boolean syncDevice)
发送消息。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.sendMsg(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
Boolean syncDevice,
ChatroomMsgLevel chatroomMsgLevel)
发送消息,支持设置聊天室消息优先级。
|
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageApi.sendRoomBroadcastMsg(String from,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice,
ChatroomMsgLevel chatroomMsgLevel)
发送聊天室全局广播消息。
|
reactor.core.publisher.Mono<EMSentMessageResults> |
MessageApi.sendWithoutMsgId(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions)
已过时。
|
reactor.core.publisher.Mono<EMSentMessageResults> |
MessageApi.sendWithoutMsgId(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice)
已过时。
|
reactor.core.publisher.Mono<EMSentMessageResults> |
MessageApi.sendWithoutMsgId(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType)
已过时。
|
reactor.core.publisher.Mono<EMSentMessageResults> |
MessageApi.sendWithoutMsgId(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
Boolean syncDevice)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
Set<EMKeyValue> |
SendChatroomMessageRequest.getExtensions() |
Set<EMKeyValue> |
SendMessageRequest.getExtensions() |
Set<EMKeyValue> |
SendChatroomMessageRequest.populateExtensions(Map<String,Object> extensions) |
Set<EMKeyValue> |
SendMessageRequest.populateExtensions(Map<String,Object> extensions) |
限定符和类型 | 方法和说明 |
---|---|
SendMessage.SendSpec |
SendMessage.SendSpec.extension(Consumer<Set<EMKeyValue>> customizer) |
static Map<String,Object> |
SendChatroomMessageRequest.parseExtensions(Set<EMKeyValue> extensions) |
static Map<String,Object> |
SendMessageRequest.parseExtensions(Set<EMKeyValue> extensions) |
reactor.core.publisher.Mono<EMSentMessageIds> |
SendMessage.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions) |
reactor.core.publisher.Mono<EMSentMessageIds> |
SendMessage.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice) |
reactor.core.publisher.Mono<EMSentMessageIds> |
SendMessage.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType) |
reactor.core.publisher.Mono<EMSentMessageIds> |
SendMessage.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
Boolean syncDevice) |
reactor.core.publisher.Mono<EMSentMessageResults> |
SendMessage.sendWithoutMsgId(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions) |
reactor.core.publisher.Mono<EMSentMessageResults> |
SendMessage.sendWithoutMsgId(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice) |
reactor.core.publisher.Mono<EMSentMessageResults> |
SendMessage.sendWithoutMsgId(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType) |
reactor.core.publisher.Mono<EMSentMessageResults> |
SendMessage.sendWithoutMsgId(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
Boolean syncDevice) |
限定符和类型 | 方法和说明 |
---|---|
Set<EMKeyValue> |
MessageSendRequest.getExtensions() |
Set<EMKeyValue> |
MessageSendRequest.populateExtensions(Map<String,Object> extensions) |
限定符和类型 | 方法和说明 |
---|---|
MessageSend.SendSpec |
MessageSend.SendSpec.extension(Consumer<Set<EMKeyValue>> customizer) |
static Map<String,Object> |
MessageSendRequest.parseExtensions(Set<EMKeyValue> extensions) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
Set<String> tos,
EMMessage message,
Set<String> toGroupUsers,
Set<EMKeyValue> extensions,
Boolean syncDevice) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
Set<String> tos,
EMMessage message,
Set<String> toRoomUsers,
Set<EMKeyValue> extensions,
Boolean syncDevice,
ChatroomMsgLevel chatroomMsgLevel) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice,
ChatroomMsgLevel level) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
ChatroomMsgLevel level) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
Boolean syncDevice) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
Boolean syncDevice,
ChatroomMsgLevel level) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.send(String from,
String toType,
Set<String> tos,
EMMessage message,
Set<EMKeyValue> extensions,
String routeType,
ChatroomMsgLevel level) |
reactor.core.publisher.Mono<EMSentMessageIds> |
MessageSend.sendRoomBroadcast(String from,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean syncDevice,
ChatroomMsgLevel level) |
限定符和类型 | 方法和说明 |
---|---|
Set<EMKeyValue> |
ImportMessageRequest.getExtensions() |
Set<EMKeyValue> |
ImportMessageRequest.populateExtensions(Map<String,Object> extensions) |
限定符和类型 | 方法和说明 |
---|---|
ImportMessage.ImportSpec |
ImportMessage.ImportSpec.extension(Consumer<Set<EMKeyValue>> customizer) |
reactor.core.publisher.Mono<String> |
ImportMessage.importChatGroupMessage(String from,
String to,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean isAckRead,
Long msgTimestamp,
Boolean needDownload) |
reactor.core.publisher.Mono<String> |
ImportMessage.importChatMessage(String from,
String to,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean isAckRead,
Long msgTimestamp,
Boolean needDownload) |
reactor.core.publisher.Mono<String> |
ImportMessage.importMessage(String from,
String to,
EMMessage message,
Set<EMKeyValue> extensions,
Boolean isAckRead,
Long msgTimestamp,
Boolean needDownload,
String toType) |
static Map<String,Object> |
ImportMessageRequest.parseExtensions(Set<EMKeyValue> extensions) |
限定符和类型 | 方法和说明 |
---|---|
EMKeyValue |
EMCustomMessage.customExtension(String key) |
static EMKeyValue |
EMKeyValue.of(String key,
boolean value) |
static EMKeyValue |
EMKeyValue.of(String key,
double value) |
static EMKeyValue |
EMKeyValue.of(String key,
float value) |
static EMKeyValue |
EMKeyValue.of(String key,
int value) |
static EMKeyValue |
EMKeyValue.of(String key,
long value) |
static EMKeyValue |
EMKeyValue.of(String k,
Object v) |
static EMKeyValue |
EMKeyValue.of(String key,
String value) |
限定符和类型 | 方法和说明 |
---|---|
Set<EMKeyValue> |
EMCustomMessage.customExtensions() |
static Set<EMKeyValue> |
EMKeyValue.of(Map<String,Object> map) |
Set<EMKeyValue> |
EMCommandMessage.params() |
限定符和类型 | 方法和说明 |
---|---|
EMCustomMessage |
EMCustomMessage.customExtensions(Set<EMKeyValue> customParams) |
EMCommandMessage |
EMCommandMessage.params(Set<EMKeyValue> params) |
Copyright © 2024. All rights reserved.