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: ''
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]
 
31111b63
     if (! chatId)
       App.Com.sendMessage(message, to, @get('jid'), callbackOk, callbackFail)
     else
       App.Com.sendMultiMessage(message, chatId, @get('jid'), callbackOk, callbackFail)