app/assets/javascripts/backbone/models/me.js.coffee
6a6ccd01
 class Xmpp.Models.Me extends Xmpp.Models.Contact
d4872cda
   namespace: 'app.roster'
 
   defaults:
     jid: ''
     name: ''
     status: 'online'
     message: ''
4b5bb9c5
     avatar: ''
d3a36a4f
     isFB: false
d4872cda
 
   initialize: ->
     _.bindAll(this)
 
00f00dbe
     if ! @get('name')
       @set(name: @get('jid'))
 
4b5bb9c5
     @view = new Xmpp.Views.Contacts.MeView(model: this)
424fd46f
     @view.render()
 
31111b63
   sendMessage: (message, chatId, to, callbackOk, callbackFail) ->
424fd46f
     App.debug ['sending from:', @get('jid'), message]
 
b1c6b359
     if (to)
31111b63
       App.Com.sendMessage(message, to, @get('jid'), callbackOk, callbackFail)
     else
       App.Com.sendMultiMessage(message, chatId, @get('jid'), callbackOk, callbackFail)