 getFullnameFromAccount  = require '../util/getFullnameFromAccount'
 remote                  = require('../remote').getInstance()
 whoami                  = require '../util/whoami'
+isKoding                = require '../util/isKoding'
 AvatarView              = require '../commonviews/avatarviews/avatarview'
 JView                   = require '../jview'
 LinkGroup               = require '../commonviews/linkviews/linkgroup'

      when 'comment', 'like', 'mention'
        socialapi.message.byId { id: @getData().targetId }, (err, post) =>
          return kd.warn err  if err
          @setAttribute 'href', groupifyLink "/Activity/Post/#{post.slug}"
      when 'follow'
        @setAttribute 'href', groupifyLink "/#{@actors.first.profile.nickname}"
      when 'join', 'leave'

      if post
        # TODO group slug must be prepended after groups are implemented
        # groupSlug = if post.group is "koding" then "" else "/#{post.group}"
        if isKoding()
        then kd.singletons.router.handleRoute "/Activity/Post/#{post.slug}", { state: post }
        else kd.singletons.router.handleRoute calculateReactivityLink post
      else
        new KDNotificationView
          title : "This post has been deleted!"
