refresh static method

Future<OpenChannel> refresh(
  1. String channelUrl,
  2. {Chat? chat}
)

Refreshes all the data of this channel.

Implementation

static Future<OpenChannel> refresh(
  String channelUrl, {
  Chat? chat,
}) async {
  sbLog.i(StackTrace.current, 'channelUrl: $channelUrl');
  chat ??= SendbirdChat().chat;

  final channel = await chat.apiClient.send<OpenChannel>(
    OpenChannelRefreshRequest(
      chat,
      channelUrl: channelUrl,
      options: [ChannelListQueryIncludeOption.includeMetadata],
      passive: false,
    ),
  );
  return channel;
}