prefix websocket actions with chat_

This commit is contained in:
Felix Niklas 2015-11-03 15:20:31 +01:00
parent 8a075294c6
commit 5756fb0a05
3 changed files with 7 additions and 7 deletions

View file

@ -88,11 +88,11 @@ do($ = window.jQuery, window) ->
console.log 'debug', 'ws:onmessage', pipe
switch pipe.action
when 'message'
when 'chat_message'
@receiveMessage pipe.data
when 'typing_start'
when 'chat_typing_start'
@onAgentTypingStart()
when 'typing_end'
when 'chat_typing_end'
@onAgentTypingEnd()
when 'chat_init'
switch pipe.data.state

View file

@ -198,11 +198,11 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
pipe = JSON.parse(e.data);
console.log('debug', 'ws:onmessage', pipe);
switch (pipe.action) {
case 'message':
case 'chat_message':
return this.receiveMessage(pipe.data);
case 'typing_start':
case 'chat_typing_start':
return this.onAgentTypingStart();
case 'typing_end':
case 'chat_typing_end':
return this.onAgentTypingEnd();
case 'chat_init':
switch (pipe.data.state) {

File diff suppressed because one or more lines are too long