sendMessage abstract method
- ZIMMessage message,
- String toConversationID,
- ZIMConversationType conversationType,
- ZIMMessageSendConfig config, [
- ZIMMessageSendNotification? notification,
send message.
Supported versions: 2.4.0 and above.
Detailed description: This method can be used to send messages in single chat, room and group chat.
Business scenario: When you need to send message to the target user, target message room, and target group chat after logging in, send it through this interface.
Call timing: It can be called after login.
Usage limit: The interval between sending messages should be greater than 100ms. Available after login, unavailable after logout.
Related callback: ZIMMessageSentCallback, ZIMMessageSendNotification, onReceivePeMessage, onReceiveRoomMessage, onReceiveGroupMessage, onConversationChanged, onConversationTotalUnreadMessageCountUpdated.
Related APIs: queryHistoryMessage, deleteAllMessage, deleteMessages,sendMediaMessage.
messageThe message to be sent.toConversationIDThe conversation ID the message needs to be sent.conversationTypeThe conversation type the message needs to be sent.configRelated configuration for sending messages.notificationRelated notifications when messages are sent.
Implementation
Future<ZIMMessageSentResult> sendMessage(
ZIMMessage message,
String toConversationID,
ZIMConversationType conversationType,
ZIMMessageSendConfig config,
[ZIMMessageSendNotification? notification]);