Glavin001 / atom-gitter

(UNMAINTAINED) :calling: Gitter chat integration with Atom.io
https://atom.io/packages/gitter
MIT License
24 stars 4 forks source link

Display Error message when cannot login #28

Open Glavin001 opened 10 years ago

Glavin001 commented 10 years ago

From @suprememoocow:

var Gitter = require('node-gitter');
var gitter = new Gitter(token);
gitter.currentUser()
.then(function(user) {
  console.log('You are logged in as:', user.username);
})
.fail(function(err) {
console.log('ERROR', err);
});

Or

gitter.currentUser(function(err, user) {})