   roomUserState: DS.belongsTo("room_user_state")
   messages: DS.hasMany("message")
   users: DS.hasMany("user")
-
+  # historyAvailable: DS.attr("virtual", {defaultValue: true})
 
 
 App.RoomUserState = DS.Model.extend

        role: message.user.role
      user = @store.createRecord("user", userParams)
      messageObj.set("user", user)
      #TODO push or shift depending on the query
      @room.get("messages").pushObject(messageObj)


  fetchMessages: ->

    @afterMessageId = message.id

    if(@store.recordIsLoaded("user", message.user.id))
      successCallback = (user)=>
        messageObj.set("user", user)

      @store.find("user", message.user.id).then successCallback
    else
      userParams =
        id: message.user.id
