sendDirectionalMessage static method

Future<Message?> sendDirectionalMessage(
  1. int? conversationType,
  2. String? targetId,
  3. List userIdList,
  4. MessageContent? content, {
  5. String? pushContent,
  6. String? pushData,
  7. dynamic finished(
    1. int messageId,
    2. int status,
    3. int code
    )?,
})

发送定向消息

conversationType 会话类型,参见枚举 RCConversationType

targetId 会话 id

userIdList 接收消息的用户 ID 列表

content 消息内容 参见 MessageContent

option 消息配置

pushContent 接收方离线时需要显示的远程推送内容

pushData 接收方离线时需要在远程推送中携带的非显示数据

此方法用于在群组中发送消息给其中的部分用户,其它用户不会收到这条消息。 目前仅支持群组。

Implementation

static Future<Message?> sendDirectionalMessage(int? conversationType, String? targetId, List userIdList, MessageContent? content, {String? pushContent, String? pushData, Function(int messageId, int status, int code)? finished}) async {
  SendMessageOption option = SendMessageOption(false);
  return sendDirectionalMessageWithOption(conversationType, targetId, userIdList, content, option, pushContent: pushContent, pushData: pushData, finished: finished);
}