Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #173 from mjtko/kandan-170
Handle channel creation across clients (Fixes #170)
  • Loading branch information
fusion94 committed Mar 2, 2013
2 parents 9a37b1c + c2eb6de commit 8160c94
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Expand Up @@ -36,6 +36,7 @@ class Kandan.Broadcasters.FayeBroadcaster

processEventsForChannel: (eventName, data)->
Kandan.Helpers.Channels.deleteChannelById(data.entity.id) if eventName == "delete"
Kandan.Helpers.Channels.createChannelIfNotExists(channel: data.entity, channel_id: data.entity.id) if eventName == "create"

# TODO this has to be implemented
Kandan.Helpers.Channels.renameChannelById(data.entity.id, data.entity.name) if data.eventName == "update"
Expand Down
3 changes: 0 additions & 3 deletions app/assets/javascripts/backbone/views/channel_tabs.js.coffee
Expand Up @@ -30,9 +30,6 @@ class Kandan.Views.ChannelTabs extends Backbone.View
if channelName
channel = new Kandan.Models.Channel({name: channelName})
channel.save({}, {
success: (model)->
Kandan.Helpers.Channels.createChannelArea(model)

error: (model, response)->
_.each(JSON.parse(response.responseText), alert);
})
Expand Down

0 comments on commit 8160c94

Please sign in to comment.