在团队应用中将图像从机器人中的图像从机器人发送到用户

时间:2019-07-09 07:51:01

标签: c#-4.0 microsoft-teams

我正在尝试将图像从计算机发送到Team应用程序中的用户,但无法正常工作。请帮助

找到以下代码:

公共静态异步任务EchoMessage(ConnectorClient连接器,Activity活动)

    {


        ////image as attachment

        var reply = activity.CreateReply("You said: " + activity.GetTextWithoutMentions());

        reply.Attachments.Add(new Attachment()

        {



           ContentUrl="C:\\1.png",

            ContentType = "image/png",

            Name = "1.png"

        });

        await connector.Conversations.ReplyToActivityWithRetriesAsync(reply);

0 个答案:

没有答案