       kd.utils.moveCaretToEnd @refs.purposeInput
 
 
-  getPurposeAreaClassNames: -> classnames
-    'ChannelThreadPane-purposeWrapper': yes
-    'editing': @state.editingPurpose
+  onVideoStart: -> @setState { isModalOpen: yes }
+
+
+  onModalClose: -> @setState { isModalOpen: no }
+
+
+  getPurposeAreaClassNames: ->
+    classnames
+      'ChannelThreadPane-purposeWrapper': yes
+      'editing': @state.editingPurpose
 
 
   handlePurposeInputChange: (newValue) ->

kd                 = require 'kd'
React              = require 'kd-react'
classnames         = require 'classnames'
Encoder            = require 'htmlencode'
KeyboardKeys       = require 'app/util/keyboardKeys'
ActivityFlux       = require 'activity/flux'
ButtonWithMenu     = require 'app/components/buttonwithmenu'
StartVideoCallLink = require 'activity/components/common/startvideocalllink'
ChannelLabel       = require 'activity/components/channellabel'

module.exports = class ThreadHeader extends React.Component



    super props

    @state =
      editingPurpose : no
      isModalOpen    : no
      thread         : @props.thread


  channel: (keyPath...) -> @state.thread.getIn ['channel'].concat keyPath
