     if state is undefined
       return @meta.active
 
+    @meta.active = state
+
     # check if min one chat is active
     if state
+      @startPushState()
       preferences = @Session.get('preferences')
       if !preferences || !preferences.chat || !preferences.chat.active || _.isEmpty(preferences.chat.active)
         @notify(
           type: 'error'
           msg:  App.i18n.translateContent('To be able to chat you need to select min. one chat topic in settings!')
         )
-
-    @meta.active = state
-
-    # write state
-    App.WebSocket.send(
-      event:'chat_agent_state'
-      data:
-        active: @meta.active
-    )
+    else
+      @stopPushState()
+      @pushState()
 
   updateNavMenu: =>
     delay = ->

        App.Collection.loadAssets(data.assets)
      @meta = data
      @updateMeta()
      if !@pushStateStarted
        @pushStateStarted = true
        @interval(@pushState, 30000, 'pushState')
    )

    # add new chat window

      App.WebSocket.send(event:'chat_status_agent')
    )

  startPushState: =>
    return if @pushStateIntervalOn
    @pushStateIntervalOn = true
    @interval(@pushState, 55000, 'pushState')

  stopPushState: =>
    @pushStateIntervalOn = false
    @clearInterval('pushState')

  pushState: =>
    App.WebSocket.send(
      event:'chat_agent_state'
