| 39 | var resolver = Promise.defer() |
| 40 | |
| 41 | function notify() { |
| 42 | group.get() |
| 43 | .then(function(currentGroup) { |
| 44 | push.send([ |
| 45 | solo.channel |
| 46 | , wireutil.envelope(new wire.JoinGroupByAdbFingerprintMessage( |
| 47 | options.serial |
| 48 | , key.fingerprint |
| 49 | , key.comment |
| 50 | , currentGroup.group |
| 51 | )) |
| 52 | ]) |
| 53 | }) |
| 54 | .catch(grouputil.NoGroupError, function() { |
| 55 | push.send([ |
| 56 | solo.channel |
| 57 | , wireutil.envelope(new wire.JoinGroupByAdbFingerprintMessage( |
| 58 | options.serial |
| 59 | , key.fingerprint |
| 60 | , key.comment |
| 61 | )) |
| 62 | ]) |
| 63 | }) |
| 64 | } |
| 65 | |
| 66 | function joinListener(group, identifier) { |
| 67 | if (identifier !== key.fingerprint) { |