Giter Club home page Giter Club logo

Comments (7)

jmnsf avatar jmnsf commented on June 19, 2024 3

Is there an update on this?

from botbuilder-microsoftteams.

Wajeed-msft avatar Wajeed-msft commented on June 19, 2024

Please try the samples given in Update Message documentation.

Could you please try again by keeping only message text or attachment?

from botbuilder-microsoftteams.

aosolis avatar aosolis commented on June 19, 2024

This is similar to what you reported in #125. The code is trying to update a message (1 card) to something that's going to become 2 messages (text + card). That's why it's giving the error "Activity resulted into multiple skype activities".

It's a case that we're aware of and working to enable. Until then, message updates are restricted to instances that will not result in splitting. In fact, I'd recommend only text->text or card->card updates, because card->text or vice versa is also problematic. (It works, but you could see some ugly visual artifacts until the thread is refreshed.)

from botbuilder-microsoftteams.

register9091 avatar register9091 commented on June 19, 2024

Thank you for your swift response. Do you have any example in which you can only send cards and not message+card? Since the POST call requires an activity to be send.

(We are able to update simple text message but not cards with the below code)

 Activity cardTest = new Activity();
                            cardTest.withType(ActivityTypes.MESSAGE).withRecipient(activity.from())
                                    .withId(activity.id()).withFrom(activity.recipient()).withText("TEST - 1");

                            String actId = new BotConnectorImpl(activity.serviceUrl())
                                    .sendToConversation(activity.conversation().id(), activity.id(), cardTest);

                            new Runnable() {
                                @Override
                                public void run() {
                                    try {
                                        Thread.sleep(2000);
                                        System.out.println("Sending world");
                                        new BotConnectorImpl(activity.serviceUrl()).updateConversation(
                                                activity.conversation().id(), actId, new Activity().withId(actId)
                                                        .withType(ActivityTypes.MESSAGE).withText("TEST - 2"));

from botbuilder-microsoftteams.

aosolis avatar aosolis commented on June 19, 2024

In your snippet above, it looks like withText() is what adds the text to the activity. Omit the call to withText("World") when creating the second activity: that way you're doing a card->card update, which should work.

from botbuilder-microsoftteams.

aosolis avatar aosolis commented on June 19, 2024

The snippet above is text->text. Can you share the snippet for your attempt to do a card->card update?

from botbuilder-microsoftteams.

register9091 avatar register9091 commented on June 19, 2024

Got it working. Thanks 👍

It's a case that we're aware of and working to enable. Until then, message updates are restricted to instances that will not result in splitting. In fact, I'd recommend only text->text or card->card updates, because card->text or vice versa is also problematic. (It works, but you could see some ugly visual artifacts until the thread is refreshed.)

Kindly update / reopen the issue once this is fixed if possible or let me know if there is a channel where we could see changelogs.

from botbuilder-microsoftteams.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.