jovotech / jovo-framework

🔈 The React for Voice and Chat: Build Apps for Alexa, Messenger, Instagram, the Web, and more
https://www.jovo.tech
Apache License 2.0
1.67k stars 310 forks source link

class AlexaUser: Missing return statement in getPermissionToken() #152

Closed maegnes closed 6 years ago

maegnes commented 6 years ago

Hi everyone!

First of all thanks so much for developing and maintaining jovo -it's an absolute joy working with it. Keep going! 💃

I'm currently developing a skill that is based on the location of the alexa device. So I've granted the permissions and tried to get the address as pointed out in the examples. Although all permissions are granted correctly, I wasn't able to fetch the configured address of my alexa device.

After debugging the jovo-framework (I'm using Version 1.1.6) code, I found the following:

File: lib/platforms/alexaSkill/alexaUser.js

/**
 * Returns permission token
 * @return {string}
 */
getPermissionToken() {
    try {
        this.platform.getConsentToken();
    } catch (e) {
        return undefined;
    }
}

As you can see, the return statement is missing. I've tried to find the faulty part in the github code to send a PR - but the 1.1 branch seems to be okay.

NPM resolved to the following file: https://registry.npmjs.org/jovo-framework/-/jovo-framework-1.1.6.tgz. After extracting I could find the faulty part there.

So is this bug already fixed without releasing a new version in the meantime or am I missing any point(s) to understand the jovo release process of minor versions?! 😄

Kind Regards Magnus

aswetlow commented 6 years ago

Hey @maegnes

Thanks! Yes, it's fixed but not published yet. We will publish 1.2 this afternoon :)

maegnes commented 6 years ago

Sounds amazing! Thanks.

aswetlow commented 6 years ago

Fixed in v1.2