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.