sendMessage abstract method

Future<ZIMMessageSentResult> sendMessage(
  1. ZIMMessage message,
  2. String toConversationID,
  3. ZIMConversationType conversationType,
  4. ZIMMessageSendConfig config, [
  5. 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.

  • message The message to be sent.
  • toConversationID The conversation ID the message needs to be sent.
  • conversationType The conversation type the message needs to be sent.
  • config Related configuration for sending messages.
  • notification Related notifications when messages are sent.

Implementation

Future<ZIMMessageSentResult> sendMessage(
    ZIMMessage message,
    String toConversationID,
    ZIMConversationType conversationType,
    ZIMMessageSendConfig config,
    [ZIMMessageSendNotification? notification]);