Giter Site home page Giter Site logo

Comments (5)

billba avatar billba commented on September 28, 2024

This would require some sort of new flag in the chat props.

from botframework-directlinejs.

compulim avatar compulim commented on September 28, 2024

Continuation of conversation is something not supported today. On Direct Line side, it use watermark to identify which messages it need to load from the service.

If you can keep the watermark number, Direct Line won't send you the old history, and thus, Web Chat won't display them.

Does that solve the problem?

from botframework-directlinejs.

dataoracle avatar dataoracle commented on September 28, 2024

Thanks @compulim for the idea.

Our challenge is that when Web Chat starts it always begins by sending a GET to /conversations/:conversationID/activities with no watermark in the query string (&watermark=) and therefore it returns all conversation history in the first GET along the watermark for subsequent polling.

Your suggestion looks good, but if I understood correctly we would have to store the watermark somewhere and modify the Web Chat initialization to retrieve this watermark and pass it along the first GET to activities. Is that what you meant?

What we did for the time being is to modify the conversationsControllerV3.js getActivities method in our back end so when no watermark is passed in the query string we return and empty activities array and the current watermark (which is just activities.lenght. At least in this way we don't send the whole history to the Web Chat in the first load and the experience for the user is faster loading. Here would be easy for example to return the last X messages if we want to display partial history on loading, for example.

What do you think of this approach?

from botframework-directlinejs.

compulim avatar compulim commented on September 28, 2024

I still prefer client-side solution because both of the following are difficult to tackle on a server-side solution and they are important:

  • Faster to load
  • Less worries on privacy (e.g. server need to flush history after X days)

And one need to think about opening multiple tabs against same web site, handling user ID, etc.

BTW, the official support for conversation preservation is coming, but it will take 2-3 months because there are more high-pri/visible work coming before that. 😉

from botframework-directlinejs.

corinagum avatar corinagum commented on September 28, 2024

This sample would need to be created after the following: microsoft/BotFramework-WebChat#365

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.