IChatService class


IChatService class is used for querying channels.

Methods

ListChannels

Lists public channels.

Takes ListChannelsQuery for pagination. If null value is passed, returns first 100 public channels by default.

CollectionResult<ChannelInfo> ListChannels(ListChannelsQuery query = null);

Examples

Join the first public channel

var query = new ListChannelsQuery
{
    Skip = 0,
    Take = 1
};

var result = await chatService.ListChannels(query);

if(result.IsSuccessful && result.Data.Any())
{
    var channelInfo = result.Data.First();
    var channel = new MyChannel(chatService, channelInfo.Name);
    await channel.JoinOrCreate();
}

results matching ""

    No results matching ""