{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/3560","repository_url":"https://api.github.com/repos/Microsoft/BotBuilder","labels_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/3560/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/3560/comments","events_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/3560/events","html_url":"https://github.com/Microsoft/BotBuilder/issues/3560","id":262407483,"number":3560,"title":"How to send PromptDialog to the custom created Activity?","user":{"login":"denisyfrolov","id":5620027,"avatar_url":"https://avatars3.githubusercontent.com/u/5620027?v=4","gravatar_id":"","url":"https://api.github.com/users/denisyfrolov","html_url":"https://github.com/denisyfrolov","followers_url":"https://api.github.com/users/denisyfrolov/followers","following_url":"https://api.github.com/users/denisyfrolov/following{/other_user}","gists_url":"https://api.github.com/users/denisyfrolov/gists{/gist_id}","starred_url":"https://api.github.com/users/denisyfrolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisyfrolov/subscriptions","organizations_url":"https://api.github.com/users/denisyfrolov/orgs","repos_url":"https://api.github.com/users/denisyfrolov/repos","events_url":"https://api.github.com/users/denisyfrolov/events{/privacy}","received_events_url":"https://api.github.com/users/denisyfrolov/received_events","type":"User","site_admin":false},"labels":[{"id":429202671,"url":"https://api.github.com/repos/Microsoft/BotBuilder/labels/.NET%20SDK","name":".NET SDK","color":"1d76db","default":false},{"id":335881076,"url":"https://api.github.com/repos/Microsoft/BotBuilder/labels/question","name":"question","color":"b60205","default":true},{"id":586628022,"url":"https://api.github.com/repos/Microsoft/BotBuilder/labels/Telegram","name":"Telegram","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-03T12:25:05Z","updated_at":"2017-10-03T16:20:28Z","closed_at":"2017-10-03T15:18:23Z","author_association":"NONE","body":"## Bot Info \r\n* Bot handle: N/A\r\n* App ID: N/A\r\n* SDK Platform: .NET\r\n* SDK Version: Microsoft.Bot.Builder.Azure 3.2.3\r\n* Active Channels: Telegram\r\n* Deployment Environment: Auzure Bot Service\r\n\r\n## Issue Description\r\nIn short the main task is receive a message from one user and forward it to another. SendToConversation works perfectly, but I need to send PromptDialog and that's the problem. The context I'm passing to PromptDialog sends a message to the first user, but I need it does send the message to the second one. How can I do that?\r\n\r\n## Code Example\r\n\r\n```cs\r\npublic class ForwardDialog : IDialog<bool>\r\n{\r\n    public async Task StartAsync(IDialogContext context)\r\n    {\r\n        context.Wait(MessageReceivedAsync);\r\n    }\r\n\r\n    async Task MessageReceivedAsync(IDialogContext context, IAwaitable<IMessageActivity> argument)\r\n    {\r\n        string ServiceUrl = \"http://localhost:56675\";\r\n        string OriginalMessageSenderName = \"Test\";\r\n        string OriginalMessageSenderId = \"TestId\";\r\n        string OriginalMessageText = \"sd\";\r\n        ChannelAccount BotAccount = new ChannelAccount(\r\n            name: \"Bot\", \r\n            id: \"default-bot\"\r\n        );\r\n        ChannelAccount UserAccount = new ChannelAccount(\r\n            name: \"User\", \r\n            id: \"default-user\"\r\n        );\r\n        ConnectorClient ForwardClient = new ConnectorClient(new Uri(ServiceUrl));\r\n        ConversationResourceResponse ForwardConversation = ForwardClient.Conversations.CreateDirectConversation(BotAccount, UserAccount);\r\n\r\n        ForwardMessage.From = BotAccount;\r\n        ForwardMessage.Recipient = UserAccount;\r\n        ForwardMessage.Conversation = new ConversationAccount(id: ForwardConversation.Id);\r\n        ForwardMessage.Text = $\"{OriginalMessageSenderName}: {OriginalMessageText}\";\r\n        ForwardMessage.Locale = \"ru-ru\";\r\n\r\n        //ForwardClient.Conversations.SendToConversation((Activity)ForwardMessage);\r\n\r\n        PromptDialog.Text(context, PostResultAsync, \"Reply\", \"What?\", 3);\r\n    }\r\n\r\n    private async Task PostResultAsync(IDialogContext context, IAwaitable<string> prompt)\r\n    {\r\n        var result = await prompt;\r\n        await context.PostAsync($\"{result}\");\r\n        context.Wait(MessageReceivedAsync);\r\n    }\r\n}\r\n```\r\n\r\n## Reproduction Steps\r\n/--/\r\n\r\n## Expected Behavior\r\nPromptDialog will send to ChannelAccount UserAccount\r\n\r\n## Actual Results\r\nPromptDialog sends to sender of the original message"},"comment":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/comments/333894913","html_url":"https://github.com/Microsoft/BotBuilder/issues/3560#issuecomment-333894913","issue_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/3560","id":333894913,"user":{"login":"denisyfrolov","id":5620027,"avatar_url":"https://avatars3.githubusercontent.com/u/5620027?v=4","gravatar_id":"","url":"https://api.github.com/users/denisyfrolov","html_url":"https://github.com/denisyfrolov","followers_url":"https://api.github.com/users/denisyfrolov/followers","following_url":"https://api.github.com/users/denisyfrolov/following{/other_user}","gists_url":"https://api.github.com/users/denisyfrolov/gists{/gist_id}","starred_url":"https://api.github.com/users/denisyfrolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisyfrolov/subscriptions","organizations_url":"https://api.github.com/users/denisyfrolov/orgs","repos_url":"https://api.github.com/users/denisyfrolov/repos","events_url":"https://api.github.com/users/denisyfrolov/events{/privacy}","received_events_url":"https://api.github.com/users/denisyfrolov/received_events","type":"User","site_admin":false},"created_at":"2017-10-03T16:20:28Z","updated_at":"2017-10-03T16:20:28Z","author_association":"NONE","body":"No, I'm not. I hoped I receive help here because on stackoverflow.com nobody answers me."}}
{"actor":{"display_login":"denisyfrolov"}}