Glavin001 / atom-gitter

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

Auto-Join a Gitter room if not already in room #11

Closed Glavin001 closed 10 years ago

Glavin001 commented 10 years ago

Currently atom-gitter requests all of the rooms the user has joined and then checks to see if one of those is the room we wish to join.

// Iterate over all rooms
          var room = _.find(rooms, function(room) {
            // Find REPO room with correct URI
            //console.log(room, uri);
            if (room.githubType === "REPO" && room.uri === uri) {
              return true;
            }
            else
            {
              return false;
            }
          });

https://developer.gitter.im/docs/rooms-resource

Instead, we should simply join the room with the given URI first.