insertGroupMessageToLocalStorage method Null safety

Future<V2TimValueCallback<V2TimMessage>> insertGroupMessageToLocalStorage(
  1. {required String data,
  2. required String groupID,
  3. required String sender}
)

Add a message to the group message list This interface is mainly used to meet the needs of inserting some prompt messages into the group chat session, such as 'You have left the group', such messages are displayed in the chat message area. demand, but there is no need to send it to others. So insertGroupMessageToLocalStorage() is equivalent to a sendMessage() interface with the network sending capability disabled.

Parameter

data is similar to data in customMessage
groupID group id
sender sender

Back

[V2TimMessage]

Messages saved via this API are saved only to the local storage and will get lost after the app is uninstalled.

Note: web does not support this interface

Implementation

Future<V2TimValueCallback<V2TimMessage>> insertGroupMessageToLocalStorage({
  required String data,
  required String groupID,
  required String sender,
}) async {
  return ImFlutterPlatform.instance.insertGroupMessageToLocalStorage(
      data: data, groupID: groupID, sender: sender);
}