Comments (9)
@thynn11 looks like viber npm is crashing. I'd be glad to help if you provide me with a repro sample.
from botbuilder-viber.
@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.
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.
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.
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.
@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:
from botbuilder-viber.
@alexsorokoletov Thanks so much. Will try it out and keep you posted.
from botbuilder-viber.
@thynn11 let me know if I can close this issue. Thank you
from botbuilder-viber.
yes, thank you!
from botbuilder-viber.
Related Issues (8)
- [Question] Does this library partially support Hero Card? HOT 3
- How to register viberConnector on botframwork v4? HOT 1
- Can't reply to messages HOT 7
- Documentation of sending a keyboard HOT 1
- Error ERR_INVALID_ARG_TYPE when sending message from Viber bot HOT 2
- [Q] Are we able to use that connector in .Net project? HOT 2
- [Question] Creating Viber Public Accounts for not-large-brands is not possible anymore? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botbuilder-viber.