joinChatRoom static method

Future<void> joinChatRoom(
  1. String targetId,
  2. int messageCount
)

加入聊天室

targetId 聊天室 id

messageCount 需要获取的聊天室历史消息数量 0<=messageCount<=50 -1 代表不获取历史消息 0 代表默认 10 条

会通过 onJoinChatRoom 回调加入的结果

Implementation

static Future<void> joinChatRoom(String targetId, int messageCount) async {
  Map map = {"targetId": targetId, "messageCount": messageCount};
  await _channel.invokeMethod(RCMethodKey.JoinChatRoom, map);
}