sendFaceMessage method

  1. @Deprecated('sendFaceMessage自3.6.0开始弃用,我们将创建消息与发送消息分离,请先使用createFaceMessage创建消息,再调用sendMessage发送消息')
Future<V2TimValueCallback<V2TimMessage>> sendFaceMessage({
  1. required int index,
  2. required String data,
  3. required String receiver,
  4. required String groupID,
  5. MessagePriorityEnum? priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  6. bool onlineUserOnly = false,
  7. bool isExcludedFromUnreadCount = false,
  8. OfflinePushInfo? offlinePushInfo,
})

创建表情消息

SDK 并不提供表情包,如果开发者有表情包,可使用 index 存储表情在表情包中的索引, 或者直接使用 data 存储表情二进制信息以及字符串 key,都由用户自定义,SDK 内部只做透传。

参数 index 表情索引 data 自定义数据

Implementation

@Deprecated('sendFaceMessage自3.6.0开始弃用,我们将创建消息与发送消息分离,请先使用createFaceMessage创建消息,再调用sendMessage发送消息')
Future<V2TimValueCallback<V2TimMessage>> sendFaceMessage({
  required int index,
  required String data,
  required String receiver,
  required String groupID,
  MessagePriorityEnum? priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  bool onlineUserOnly = false,
  bool isExcludedFromUnreadCount = false,
  OfflinePushInfo? offlinePushInfo,
}) async {
  return await TencentCloudChatSdkPlatform.instance.sendFaceMessage(
      index: index, data: data, receiver: receiver, groupID: groupID, priority: priority!.index, onlineUserOnly: onlineUserOnly, isExcludedFromUnreadCount: isExcludedFromUnreadCount, offlinePushInfo: offlinePushInfo?.toJson());
}