 
 class ActivitySidebar extends KDCustomHTMLView
 
-
   typeMap =
     privatemessage : 'Message'
     topic          : 'Topic'
     post           : 'Post'
     chat           : 'Chat'
-
 
   slugProps =
     SocialMessage : 'slug'

  # when a comment is added to a post
  replyAdded: (update) ->

    {socialapi}        = KD.singletons
    {unreadCount}      = update
    {id, typeConstant} = update.channelMessage
    type               = 'post'

    # if the reply is added to a private message
    # we need to get the channel instead of the post
    # the other case of reply being added is followed post
    if typeConstant is 'privatemessage'
      type    = 'channel'
      id      = update.channel.id

    # so we fetch respectively
    socialapi.cacheable type, id, (err, data) =>

      .on 'RenderMachines',            @bound 'renderMachines'
      .on 'MachineBeingDestroyed',     @bound 'invalidateWorkspaces'

    @on 'MoreWorkspaceModalRequested', @bound 'handleMoreWorkspacesClick'

  # event handling
