sendMediaMessage abstract method

Future<ZIMMessageSentResult> sendMediaMessage(
  1. ZIMMediaMessage message,
  2. String toConversationID,
  3. ZIMConversationType conversationType,
  4. ZIMMessageSendConfig config,
  5. ZIMMediaMessageSendNotification? notification,
)

Send media messages. Supported versions: 2.1.5 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 media to the target user, target message room, and target group chat after logging in, send it through this interface.

Call timing/Notification timing: It can be called after login.

Usage limit: no more than 10/s, available after login, unavailable after logout.

Impact: ZIMEventHandler.onReceivePeerMessageZIMEventHandler.onReceiveGroupMessage sessions and session-scoped ZIMEventHandler.onReceiveGroupMessage sessions did not fire message receiver's ZIMEventHandler.onConversationChanged fires ZIMEventHandler.onConversationTotalUnreadMessageCountUpdated objection.

Note: Have a breaking change in version 2.4.0 of this interface,see changelog for details.Only required if you need to use the threaded update feature when pushing configuration. Push notifications are not supported, nor are ZIMEventHandler.onConversationChanged and ZIMEventHandler.onConversationTotalUnreadMessageCountUpdated supported if media messages are broadcast to the world.

Related: ZIMMessageSentResult, ZIMMediaUploadingProgress, ZIMEventHandler.onReceivePeerMessage, ZIMEventHandler.onReceiveRoomMessage, ZIMEventHandler.onReceiveGroupMessage, ZIMEventHandler.onConversationChanged, ZIMEventHandler.onConversationTotalUnreadMessageCountUpdated.

Related interfaces: queryHistoryMessage, deleteAllMessage, deleteMessages

message The message to be sent. toConversationID The ID of the conversation which will receive the message. conversationType The type of the conversation which will receive the message. config Related configuration for sending single chat messages. notification Relevant notifications when sending media messages, including upload progress, etc.

Implementation

Future<ZIMMessageSentResult> sendMediaMessage(
    ZIMMediaMessage message,
    String toConversationID,
    ZIMConversationType conversationType,
    ZIMMessageSendConfig config,
    ZIMMediaMessageSendNotification? notification);