示例#1
0
        public async Task <string> StartChannel(ITurnContext turnContext)
        {
            // Get the channel log.
            ChannelLog channelLog = await GetChannelLog(turnContext);

            // Create channel
            ChannelLog.ChannelData channel = CreateChannel(turnContext, channelLog);

            // Set the new property
            await _channelLogPropertyAccessor.SetAsync(turnContext, channelLog);

            // Now save it into the ChannelState
            await _channelState.SaveChangesAsync(turnContext);

            await turnContext.SendActivityAsync(
                $"We're saving {channel.Conversation.Conversation.Id} for future updates.");

            return(channel.Conversation.Conversation.Id);
        }