我正在为 Twilio (SMS) 频道构建一个机器人。当我向美国的一个号码发送简单的纯短信时,它在 twilio 消息日志中的状态为Delivered
.
但是,当我将任何图像附加到消息以发送 MMS 时,消息永远不会被传递,并且它在 twilio 日志中的状态sent
始终保持不变。
这是我将媒体附加到 MMS 的方式。
var msg = new builder.Message(session);
msg.attachmentLayout(builder.AttachmentLayout.list)
msg.attachments([
new builder.HeroCard(session)
.title("This is Title")
.subtitle("This is sub title")
.text("This is text")
.images([builder.CardImage.create(session, 'http://www.readersdigest.ca/wp-content/uploads/2011/01/4-ways-cheer-up-depressed-cat.jpg')])
]);
session.send(msg).endDialog();
我还使用了另一种方式来构建消息:
var msg = new builder.Message(session)
.text("This is a title - which can be long and multiple line sometimes<br/><br/>The body of the text can be really really long sometimes with different formats with links <http://google.com|Google><br/><br/>some times with a footer with `formats`")
.addAttachment({
contentUrl: 'http://www.readersdigest.ca/wp-content/uploads/2011/01/4-ways-cheer-up-depressed-cat.jpg',
contentType: 'image/png',
name: 'BotFrameworkOverview.png'
});
这两条消息永远不会被传递。
但是没有媒体的简单消息成功传递为-
var msg = new builder.Message(session)
.text("This is a title - which can be long and multiple line sometimes<br/><br/>The body of the text can be really really long sometimes with different formats with links <http://google.com|Google><br/><br/>some times with a footer with `formats`")
Twilio 日志: