createNativeSendMessage static method
Map<String, dynamic>
createNativeSendMessage({
- required Map<
String, dynamic> createdMessage, - required String groupId,
- required String userID,
- int? priority,
- bool? onlineUserOnly,
- bool? isExcludedFromUnreadCount,
- bool? isExcludedFromLastMessage,
- bool? isExcludedFromContentModeration,
- bool? needReadReceipt,
- Map<
String, dynamic> ? offlinePushInfo, - String? cloudCustomData,
- String? localCustomData,
- bool? isSupportMessageExtension = false,
Implementation
static Map<String, dynamic> createNativeSendMessage({
required Map<String, dynamic> createdMessage,
required String groupId,
required String userID,
int? priority,
bool? onlineUserOnly,
bool? isExcludedFromUnreadCount,
bool? isExcludedFromLastMessage,
bool? isExcludedFromContentModeration,
bool? needReadReceipt,
Map<String, dynamic>? offlinePushInfo,
String? cloudCustomData,
String? localCustomData,
bool? isSupportMessageExtension = false,
}) {
createdMessage['message_conv_type'] = groupId.isEmpty ? 2 : 1;
createdMessage["message_conv_id"] = groupId.isEmpty ? userID : groupId;
createdMessage["message_priority"] = priority;
createdMessage["message_need_read_receipt"] = needReadReceipt ?? false;
createdMessage["message_is_online_msg"] = onlineUserOnly ?? true;
createdMessage["message_is_excluded_from_unread_count"] = isExcludedFromUnreadCount ?? false;
createdMessage["message_excluded_from_last_message"] = isExcludedFromLastMessage ?? false;
createdMessage["message_cloud_custom_str"] = cloudCustomData ?? "";
createdMessage["message_custom_str"] = localCustomData ?? "";
createdMessage["message_offline_push_config"] = offlinePushInfo;
createdMessage["message_excluded_from_content_moderation"] = isExcludedFromContentModeration ?? true;
createdMessage["message_is_excluded_from_unread_count"] = isExcludedFromUnreadCount ?? false;
return createdMessage;
}