simple-xmpp / node-simple-xmpp

Simple High Level NodeJS XMPP Client
302 stars 90 forks source link

xml-not-well-formed error when sending a message #51

Closed jwoertink closed 9 years ago

jwoertink commented 9 years ago

When I try to send a message, it causes me to log out and then throws an error: screen shot 2014-10-02 at 11 27 00 am

class User
    constructor: ->
        @xmpp = require('simple-xmpp')
        #.... other stuff
    connect: ->
        @xmpp.connect
            jid: "#{@extension}@#{@server}"
            password: @settings.password
            host: @server
            port: 5222
        @xmpp.on 'error', (err)->
           console.error('XMPP ERROR', err)
        @xmpp.on 'close', ->
           console.log('connection has been closed!')
    sendMessage: (user, message)->
        target = "#{user}@#{@server}"
        @xmpp.send(target, message)

I sign in, and can set presence just fine. It's only when I try to send a message when it logs me out and throws that error. Using version 0.1.92