Contribute to Open Source. Search issue labels to find the right project for you!

[Telegram] Conversation.ResumeAsync not working on Telegram

Microsoft/BotBuilder

I think I can repro this fairly consistently:

Take a bot that uses conversation.ResumeAsync that works on other channels. Try it on Telegram. You will get this error:

“Unknown botId <username>”

Where username is the Telegram’s user name, not the actual bot ID. Somewhere these values are getting mixed. I found this by accident when folks told me authbot wasn’t working on Telegram anymore. I believe this was introduced in some recent version of the library maybe?

Updated 19/05/2017 19:27 2 Comments

[Telegram] Is Mention Entity supported for Telegram?

Microsoft/BotBuilder

System Information (Required)

  • SDK language C#
  • SDK version 3.8
  • Development environment - Azure Bot Service

    Issue Description

    I am trying to add mention entity to my reply activities as described in this article. When I send the reply constructed with the code below I get no actual reply from the bot in the channel.

Example Code

var reply = activity.CreateReply();
var replyText = "test";

var entity = new Entity();
entity.SetAs(new Mention
{
    Text = replyText,
    Mentioned = new ChannelAccount
    {
        Name = activity.From?.Name,
        Id = activity.From?.Id
    }
});

reply.Entities.Add(entity);

await Connector.Conversations.ReplyToActivityAsync(reply);

Expected Behavior

This is how replies look like in Telegram when you do it as a user from UI: http://imgur.com/pzYvV2C

Updated 22/05/2017 22:31 2 Comments

[Telegram] System.UnauthorizedAccessException for bot-initiated connection to https://telegram.botframework.com

Microsoft/BotBuilder

Hi, I have faced really weird issue

When the bot had started, I sent a message to it via skype; due to the logic of the bot it tried to send a message via telegram to contact, that contacted a bot earlier (before this launch).

As a result I got the following exception { "ClassName": "System.UnauthorizedAccessException", "Message": "Authorization for Microsoft App ID *** failed with status code Forbidden", ... } The connector was created by the following code _connector = new ConnectorClient(new Uri(apiEndpoint)); where apiEndpoint is a string, saved during the previous launch, and it equals to “https://telegram.botframework.com”

The message was created “from scratch” by pre-saved apiEndpoint and id of recipient { "type": "message", "serviceUrl": "https://telegram.botframework.com", "channelId": "telegram", "from": { "id": "devexbot", "name": "devex" }, "conversation": { "isGroup": false, "id": "295410140" }, "recipient": { "id": "295410140" }, "text": *** }

The most interesting thing, that when I contacted the same bot via telegram within this launch of the bot, the same code worked and the message was sent and delivered properly, so to provide proper functionality of the bot I have to contact it with telegram after each service launch

Updated 21/05/2017 14:38 4 Comments

Fork me on GitHub