public async Task <Channels_ChannelParticipants> GetAllParticipants( long chatId, ChannelParticipantsFilter channelParticipantsFilter = null, bool evictAfter = false, bool disableCache = false ) { var channelId = chatId.ReduceChatId(); var isProbeAdmin = await IsProbeAdminAsync(chatId); var channelParticipants = await _cacheService.GetOrSetAsync( cacheKey : "tdlib-channel-participants-" + channelId, evictAfter : evictAfter, disableCache : disableCache, staleAfter : "5m", action : async() => { var channel = await GetChannel(chatId); var allParticipants = await _client.Channels_GetAllParticipants(channel: channel, includeKickBan: isProbeAdmin); return(allParticipants); } ); return(channelParticipants); }
getParticipants(InputChannel channel, ChannelParticipantsFilter filter, int offset, int limit) { var request = new TL.ChannelsGetParticipantsRequest(channel, filter, offset, limit); await _sender.Send(request); await _sender.Receive(request); var result = (TL.ChannelsChannelParticipantsType)request.Result; return(new Tuple <List <User>, List <ChannelParticipant> >(result.Users, result.Participants)); }