限定符和类型 | 方法和说明 |
---|---|
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)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
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) |
构造器和说明 |
---|
SendChatroomMessageRequest(String from,
String targetType,
Set<String> targets,
EMMessage message,
Map<String,Object> extensions,
String clientId) |
SendMessageRequest(String from,
EMMessage message,
Map<String,Object> extensions,
Boolean syncDevice,
ChatroomMsgLevel chatroomMsgLevel) |
SendMessageRequest(String from,
String targetType,
Set<String> targets,
EMMessage message,
Map<String,Object> extensions) |
SendMessageRequest(String from,
String targetType,
Set<String> targets,
EMMessage message,
Map<String,Object> extensions,
Boolean syncDevice) |
SendMessageRequest(String from,
String targetType,
Set<String> targets,
EMMessage message,
Map<String,Object> extensions,
String routeType) |
SendMessageRequest(String from,
String targetType,
Set<String> targets,
EMMessage message,
Map<String,Object> extensions,
String routeType,
Boolean syncDevice) |
限定符和类型 | 方法和说明 |
---|---|
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) |
限定符和类型 | 方法和说明 |
---|---|
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) |
构造器和说明 |
---|
ImportMessageRequest(String from,
String target,
EMMessage message,
Map<String,Object> extensions,
Boolean isAckRead,
Long msgTimestamp,
Boolean needDownload) |
限定符和类型 | 类和说明 |
---|---|
class |
EMCommandMessage |
class |
EMCustomMessage |
class |
EMFileMessage |
class |
EMImageMessage |
class |
EMLocationMessage |
class |
EMTextMessage |
class |
EMVideoMessage |
class |
EMVoiceMessage |
限定符和类型 | 方法和说明 |
---|---|
EMMessage |
EMMessage.fromUser(String username) |
EMMessage |
EMMessage.toGroup(String groupId) |
EMMessage |
EMMessage.toRoom(String roomId) |
EMMessage |
EMMessage.toUser(String username) |
Copyright © 2024. All rights reserved.