insertMessageToLocalDB abstract method

Future<ZIMMessageInsertedResult> insertMessageToLocalDB(
  1. ZIMMessage message,
  2. String conversationID,
  3. ZIMConversationType conversationType,
  4. String senderUserID,
)

Supported Versions: 2.4.0 and above.

Detail description: This method can insert a message directly to the local DB on the client side.

Business scenario: The developer can combine the system message type, and convert the callback notification (for example, invite someone into the group, remove someone from the group, etc.) to the system message type on the client side and insert it into the local DB to achieve the effect of the system prompt .

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

Usage Restrictions: Currently, only chat and group messages can be inserted. Room messages cannot be inserted.

Related callback: ZIMMessageInsertedResult.

Related interfaces: queryHistoryMessage, deleteAllMessage, deleteMessages.

Implementation

Future<ZIMMessageInsertedResult> insertMessageToLocalDB(
    ZIMMessage message,
    String conversationID,
    ZIMConversationType conversationType,
    String senderUserID);