Fix bug, Support thirdparty streaming access

This commit is contained in:
syuilo 2017-01-06 01:45:02 +09:00
parent fa591e5c9b
commit 2ded8ba858
4 changed files with 31 additions and 18 deletions

View file

@ -9,7 +9,7 @@ class Connection
@event = riot.observable!
@me = me
host = CONFIG.api.url.replace \http \ws
@socket = new ReconnectingWebSocket "#{host}/messaging?otherparty=#{otherparty}"
@socket = new ReconnectingWebSocket "#{host}/messaging?i=#{me.token}&otherparty=#{otherparty}"
@socket.add-event-listener \open @on-open
@socket.add-event-listener \message @on-message