GithubHelp home page GithubHelp logo

Comments (9)

alexsorokoletov avatar alexsorokoletov commented on July 18, 2024

@thynn11 looks like viber npm is crashing. I'd be glad to help if you provide me with a repro sample.

from botbuilder-viber.

thynn11 avatar thynn11 commented on July 18, 2024

@alexsorokoletov First off, thanks for the offer to help.

We learned that the issue in on our side. We had some parsing logic that's interfering with the way it's expecting. This is non issue.

We have other errors and added some logic to handle video and endOfConversation types.

from botbuilder-viber.

thynn11 avatar thynn11 commented on July 18, 2024

@alexsorokoletov

We are almost getting the bot working in viber. The bot is deployed in fb and skype channels but we want to add viber as a channel.

One issue left though. Somehow, the image (attached by the user) is not recognized and it kept saying "I didn't receive a file, please try again".

A sample program to troubleshoot this "file attachment" issue.
https://github.com/thynn11/botbuilder-viber-test

Any help will be really appreciated.

Thank you.

from botbuilder-viber.

alexsorokoletov avatar alexsorokoletov commented on July 18, 2024

Hi @thynn11
Source code looks good to me. Do I understand correctly that you are sending picture from viber to your bot and you can't receive it?

from botbuilder-viber.

thynn11 avatar thynn11 commented on July 18, 2024

@alexsorokoletov

Correct. If you run the program, it just has one prompt to demonstrate the issue.

Even though a picture is attached, it's still complaining with a default message "I didn't receive a file, please try again".

I tried to change the entity syntax if type === "picture" but no luck. ViberEnabledConnector.prototype.processMessage (below)
var rawMessage = message.toJson();
if (rawMessage.type === 'text') {
msg = msg.text(message.text);
} else {
msg = msg.text('[entity]').addEntity(rawMessage);
}
this.handler([msg.toMessage()]);

Help?

Thanks.

from botbuilder-viber.

alexsorokoletov avatar alexsorokoletov commented on July 18, 2024

@thynn11 indeed, pictures are not recognized.
I've been able to adjust connector to correctly understand pictures and also fixed way we're translating unrecognized messages to botbuilder.

Now, with version 0.0.3 you would need to do one slight change in your app.js:

From:

    function(session, results)
    {
        session.userData.pic = results.response;
        session.endDialog("Thank you!");                
    }	

To:

    function(session, results)
    {
        var picture = results.response[0];
        var url = picture.contentUrl;
        var type = picture.contentType;
        session.userData.pic = url;
        session.endDialog("Thank you! Picture " + type + " received " + url);                
    }	

Example below:

screenshot 2018-02-15 01 07 34

from botbuilder-viber.

thynn11 avatar thynn11 commented on July 18, 2024

@alexsorokoletov Thanks so much. Will try it out and keep you posted.

from botbuilder-viber.

alexsorokoletov avatar alexsorokoletov commented on July 18, 2024

@thynn11 let me know if I can close this issue. Thank you

from botbuilder-viber.

thynn11 avatar thynn11 commented on July 18, 2024

yes, thank you!

from botbuilder-viber.

Related Issues (8)

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.