public async Task <PrivateChannel> CreatePrivateChannel(ulong userId) { var channel = GetPrivateChannel(userId); if (channel != null) { return(channel); } var request = new CreatePrivateChannelRequest() { RecipientId = userId }; var response = await ClientAPI.Send(request).ConfigureAwait(false); return(AddPrivateChannel(response)); }
public async Task<Channel> CreatePrivateChannel(ulong userId) { var channel = GetPrivateChannel(userId); if (channel != null) return channel; var request = new CreatePrivateChannelRequest() { RecipientId = userId }; var response = await ClientAPI.Send(request).ConfigureAwait(false); channel = AddPrivateChannel(response.Id, userId); channel.Update(response); return channel; }