twilio-programmable-chat

How to listen for messages on a single channel in Twilio Programmable Chat

时光毁灭记忆、已成空白 提交于 2020-03-05 00:27:35
问题 Using twilio-chat.js how can I listen for messages on a single channel? I found this question which asks how to listen on multiple channels, but I can't find anything describing how to do this on a single channel. (Where token is an Access Token). Currently I have: let client = await Twilio.Chat.Client.create(token); client.on('messageAdded', function(message){...}) 回答1: The messageAdded event is fired when messages are added to the channel . The client picks up on all of these events on all

Twilio - channel descriptor paginator order

笑着哭i 提交于 2020-02-07 01:31:36
问题 I want to retrieve the list of channels for a user containing unread messages. The best solution I have found so far (please correct me if I'm wrong) is using channel descriptors. // Example for a single page client.getUserChannelDescriptors().then(function(paginator) { for (var i = 0; i < paginator.items.length; i++) { var descriptor = paginator.items[i].descriptor; if (descriptor.unread_messages_count > 0) { console.log("Channel found, id: " + descriptor.uniqueName); } } }); My question: is

Twilio Programmable Chat throwing Can't connect to twilsock

淺唱寂寞╮ 提交于 2020-01-24 19:33:07
问题 When I'm trying to use the programmatic chat I'm constantly getting this error Error: Can't connect to twilsock at t (twilio-chat.min.js:204) at t (twilio-chat.min.js:204) at new t (twilio-chat.min.js:204) at e.value (twilio-chat.min.js:204) at t.value (twilio-chat.min.js:204) at twilio-chat.min.js:204 at t.<anonymous> (twilio-chat.min.js:204) at twilio-chat.min.js:168 at t.a.emit (twilio-chat.min.js:168) at t.value (twilio-chat.min.js:175) I followed all the instruction for the repo I'm

How to get image from NSOutputStream in Objective-C

醉酒当歌 提交于 2020-01-06 04:46:04
问题 I am using twilio chat SDK, in that I am doing store and retrieve the image. So to retrieve the image from twilio I am getting NSOutputStream , And I don't know that how to convert NSOutputStream to image. Please see the below code which provided by twilio and give me some suggestions. chatCell.message = message.body; if (message.hasMedia) { NSLog(@"mediaFilename: %@ (optional)", message.mediaFilename); NSLog(@"mediaSize: %lu", (unsigned long)message.mediaSize); // Set up output stream for

Problems with verb Record timeout when calling an IVR

蹲街弑〆低调 提交于 2020-01-04 05:54:22
问题 We're trying to use Twilio to create an automated test framework for those IVRs. We do an outbound call from Twilio to the IVR, use the verb Say/Play to interact with the IVR and we're using Record to capture what the IVR is saying, latter we transcribe it and make the assertions. When I ask Twilio to call a phone number and I pretend to be the IVR, everything works perfectly. But when I ask Twilio to call the real IVR, apparently the Record verb can't recognize the pauses, when the IVR stops

twilio how to get possible users

故事扮演 提交于 2019-12-24 05:09:26
问题 I retrieved an access token from my server and have connected the JavaScript SDk chat client like so. I have created a channel like so. The next step I'd like to invite a user like this. In that example they invite the user 'elmo'. Where do I get 'elmo' or how do I present the user with a selection of possible 'elmo's? The client sdk has no list users functionality. Edit: It looks like the REST API has a list users method. But can't find any examples of it used. Should the 1st person chat

Twilio sandbox webhook url returning timeout execution error

这一生的挚爱 提交于 2019-12-20 06:26:51
问题 can anyone please tell me how to increase timeout for twilio sandbox http post url. I am trying to building one programmable chat application using whatsapp twilio sandbox using asp.net technology. Normally my application methods takes 20 plus seconds to run but when i did same thing on twilio sandbox then its returning execution timeout error. is there any way to increase timeout for twilio sandbox using .net. 回答1: Twilio developer evangelist here. The Twilio webhook timeout is 15 seconds

Twilio SWIFT API get consumed messages always returns 0

丶灬走出姿态 提交于 2019-12-13 03:56:53
问题 I want to display next to a chat channel the number of messages a channel has that have been unconsumed or unread (I assume this is what unconsumed means?) Currently I send messages to a channel that two users are subscribed to , a private chat. Then before opening up the chat window I check the channel for unconsumed messages, but it always say 0 messages even if I call setNoMessagesConsumedWithCompletion. I am using the Swift API...What do I need to do to find out how many messages in my

Twilio MMS status is always remains Sent when sent using Bot framework

我的未来我决定 提交于 2019-12-13 03:44:42
问题 I am building a bot for Twilio (SMS) channel. When I send a Simple plain SMS to a number in US, it gets delivered with status in twilio message log as Delivered . But when I attach any image to the message to send MMS, the message never gets delivered, and its status in twilio log remains sent always. Here is how I'm attaching media to MMS. var msg = new builder.Message(session); msg.attachmentLayout(builder.AttachmentLayout.list) msg.attachments([ new builder.HeroCard(session) .title("This

Using twilio-chat with NativeScript and Angular

天大地大妈咪最大 提交于 2019-12-11 14:08:38
问题 I have the folowing chat service: import { Injectable, EventEmitter } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import * as Twilio from 'twilio-chat'; import Client from 'twilio-chat'; import { Channel } from 'twilio-chat/lib/channel'; @Injectable({ providedIn: 'root' }) export class ChatService { chatClient: Client; currentChannel: Channel; chatConnectedEmitter: EventEmitter<any> = new EventEmitter<any>();