1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Allow invites for an already joined member to succeed.

This commit is contained in:
Simo Kinnunen 2014-04-22 10:21:15 +09:00
parent 33d2862704
commit 9375fd7fe6

View file

@ -32,7 +32,11 @@ module.exports = syrup.serial()
plugin.join = function(newGroup, timeout) {
return plugin.get()
.then(function() {
throw new grouputil.AlreadyGroupedError()
if (currentGroup.group !== newGroup.group) {
throw new grouputil.AlreadyGroupedError()
}
return currentGroup
})
.catch(grouputil.NoGroupError, function() {
currentGroup = newGroup