sendMessage method
Future<V2TimValueCallback<V2TimMessage> >
sendMessage({
- required String id,
- required String receiver,
- required String groupID,
- int priority = 0,
- bool onlineUserOnly = false,
- bool isExcludedFromUnreadCount = false,
- bool isExcludedFromLastMessage = false,
- bool? isSupportMessageExtension = false,
- bool? isExcludedFromContentModeration = false,
- bool needReadReceipt = false,
- Map<
String, dynamic> ? offlinePushInfo, - String? cloudCustomData,
- String? localCustomData,
override
3.6.0 新接口统一发送消息实例
Implementation
@override
Future<V2TimValueCallback<V2TimMessage>> sendMessage(
{required String id,
required String receiver,
required String groupID,
int priority = 0,
bool onlineUserOnly = false,
bool isExcludedFromUnreadCount = false,
bool isExcludedFromLastMessage = false,
bool? isSupportMessageExtension = false,
bool? isExcludedFromContentModeration = false,
bool needReadReceipt = false,
Map<String, dynamic>? offlinePushInfo,
String? cloudCustomData, // 云自定义消息字段,只能在消息发送前添加
String? localCustomData // 本地自定义消息字段
}) async {
return await _v2timMessageManager.sendMessageForNew<V2TimValueCallback<V2TimMessage>, V2TimMessage>(params: {
"id": id,
"receiver": receiver,
"groupID": groupID,
"priority": priority,
"onlineUserOnly": onlineUserOnly,
"isExcludedFromUnreadCount": isExcludedFromUnreadCount,
"isExcludedFromLastMessage": isExcludedFromLastMessage,
"cloudCustomData": cloudCustomData,
"needReadReceipt": needReadReceipt
});
}