     set(channel) {
       _channel = channel
       title = _channel.friendlyName
+      _channel.delegate = self
 
       if _channel == ChannelManager.sharedManager.generalChannel {
         navigationItem.rightBarButtonItem = nil

  func joinChannel() {
    if channel.status == .Joined {
      loadMessages()
      channel.delegate = self
      return
    }


    textInputbarHidden = true

    channel.joinWithCompletion { result in
      dispatch_async(dispatch_get_main_queue(), {
        UIApplication.sharedApplication().networkActivityIndicatorVisible = false
        self.setTextInputbarHidden(false, animated: true)
      })
    }
  }
