   getInitialState: ->
     firstMeta: { }
     lastMeta: { }
+    notificationsMap: { }
 
   componentWillMount: ->
     @getNotifications() if @props.user

      meta = newNotifications[0]?.getMeta() or { }
      notifications = @state.notifications or newNotifications
      meta.notificationIds = (n.id for n in newNotifications)

      {firstMeta, lastMeta} = @state


  markAsRead: (meta)->
    =>
      ids = @state["#{ meta }Meta"].notificationIds
      ids = (id for id in ids when not @state.notificationsMap[id].delivered)
      return if ids.length is 0
      setTimeout =>
        talkClient.put '/notifications/read', id: ids.join(',')
        for notification in @state.notifications when notification.id in ids
