Skip to content

Instantly share code, notes, and snippets.

@ryanramage
Last active February 9, 2017 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanramage/c55ba519e32db6006d579f733e3dbc6e to your computer and use it in GitHub Desktop.
Save ryanramage/c55ba519e32db6006d579f733e3dbc6e to your computer and use it in GitHub Desktop.
twilio things

Tech things

  • No insight into websocket billing (reads, writes, etc) api is not clear on this
  • Hard to do initial sync with disposable channels. new api may help but we have not upgraded
  • 2 system sync has lots of fun timing issues. All the stuff that is not in twilio pchat, we need to sync to the local machine
        channel.sendMessage(message, {
          origin: 'internal',
          sender: sender
        }).then((messageId) => {
          channel.getMessages(1, 'end').then(messages => {
            var message = serialize(messages[0])
            message._id = `message/${sid}/${message.sid}`
            done(null, message)
          })
        }).catch(done)

Currently sendMessage does not return the sid of the message, only the message counter we need the sid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment