question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.SendActivity() takes Activity and not IActivity; IMessageActivity objects are unusable (ie: MessageFactory outputs)

See original GitHub issue
var m = MessageFactory.Attachment(default(Attachment));
await context.SendActivity(m);

no longer works in latest master branch because the new SendActivity method takes params Activity[] instead of IActivity or something to which IMessageActivity objects are implicitly convertible

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Steveniccommented, Mar 16, 2018

I personally believe that we should drop the IXxxxActivity parts all together as this is not in parity with the other languages. Unless we change our swagger to generate these interfaces we just shouldn’t use them. I took this approach in the v3 Node SDK and have spent the last 2 years having to manually keep them updated with changes. That way lies madness…

To be at parity with the other languages you should just pass around an IActivity everywhere and the developer needs to know what fields are used for which type. Don’t like that? Fix the swagger…

EDIT: For the benefit of those on the thread I’m the anti-Swagger guy on the team. I personally think it’s one notch above useless. With that said… I find it ironic that the one thing I think it is useful at, keeping your schema in sync across languages, is the thing that’s most screwed up in our Swagger.

0reactions
cleemullinscommented, Mar 19, 2018

The issue here, as defined by the title, is resolved by #284. If we want to evaluate the “IActivity” vs “Activity” vs “Multiple Interfaces” I think that’s a great discussion but should be in a dedicated topic.

Closing this out, as it was a bug. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

v4 Bot sendActivity no output in Bot [object Promise]
Since you are using the response-promise package, I would recommend using async/await instead of the then/catch method.
Read more >
DelegatingTurnContext<T> Class (Microsoft.Bot.Builder)
A TurnContext with a strongly typed Activity property that wraps an untyped inner TurnContext. ... Gets the bot adapter that created this context...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found