Skip to content

Setting subscribeKey after initialisation #8

Description

@lk77

Hello,

i have an use case where the subscribe key is in a vuex store, and is not available at the initialisation of the plugin :

Vue.use(PubNubVue, {
    subscribeKey: null,
    ssl: true,
    uuid: null
});

I'm then subscribing to the vuex store, and then i'm updating subscribeKey, but there is no easy method to do it.

i've done :

PubNubVue.getInstance().setUUID($store.state.pbnUUID).subscribeKey = $store.state.pbnSubscribeKey

it works but a method like this could be usefull :

PubNubVue.setConfig({
    subscribeKey: $store.state.pbnSubscribeKey,
    ssl: true,
    uuid: $store.state.pbnUUID
})

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions