Coder Social home page Coder Social logo

Comments (7)

billba avatar billba commented on July 17, 2024

You have to either call postActivity or subscribe to activity$ to actually connect.

from botframework-directlinejs.

nsantini avatar nsantini commented on July 17, 2024

Doing both:

  directLine.activity$
    .subscribe(
      activity => process(activity),
      error => console.error("activity$ error", error)
    );
  
  directLine.postActivity({
          from: { id: 'myUserId', name: 'myUserName' }, // required (from.name is optional)
          type: 'message',
          text: "hi"
        }).subscribe(
          id => logger.debug("Posted activity, assigned ID ", id),
          error => logger.error("Error posting activity", error)
        );
  

from botframework-directlinejs.

billba avatar billba commented on July 17, 2024

Looks right to me. Have you tried creating a WebChat control and passing in the same secret?

from botframework-directlinejs.

nsantini avatar nsantini commented on July 17, 2024

I have WebChat enabled, and its working, tried the WebChat secret for DirectLine and still not working. Will try the DirectLine secret on the WebChat to double check that too

from botframework-directlinejs.

nsantini avatar nsantini commented on July 17, 2024

Confirmed WebChat works with either secret, but DirectLine doesn't work with either

from botframework-directlinejs.

tobybrad avatar tobybrad commented on July 17, 2024

@nsantini Is this a pure Node app?

Take a look here to see if that helps you any: #29

from botframework-directlinejs.

nsantini avatar nsantini commented on July 17, 2024

thanks @tobybrad that's the issue, Im writing a node app, no dom present. Will follow up from that thread.

from botframework-directlinejs.

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.