sidorares / node-pidgin

Pidgin node.js client using pidgin dbus api
7 stars 2 forks source link

ReceivedImMsg only returns numbers #1

Closed mmoyes closed 10 years ago

mmoyes commented 10 years ago

Using the example:

var pidgin = require('pidgin').createClient(); pidgin.on('ReceivedImMsg', function(msg) { console.log('Message!', msg) })

I only get numbers such as "1962" returned rather then the actual message

sidorares commented 10 years ago

Thanks for reporting this! Msg here is an account id. Signals pass arguments as JS arguments list (not array or object), so example should be like this:

var pidgin = require('pidgin').createClient();
pidgin.on('ReceivedImMsg', function(account, sender, message, conversation, flags) {
   console.log('Message!', message)
});

See docs - http://developer.pidgin.im/doxygen/2.5.0/html/conversation-signals.html#received-im-msg
I updated readme example.