slact / nchan.js

NPM package for the Javasript client for Nchan
Other
91 stars 25 forks source link

Message repetition #5

Open Avadon opened 7 years ago

Avadon commented 7 years ago

Greetings!

I initialise nChanSubscriber and listen for messages for a while and everything is OK. But after updating the page I receive all these messages again (no matter that in LocalStorage there is lastMessageId).

Here is my code:

    const nchan = new NchanSubscriber(nChanUrl, {
        subscriber: 'longpoll',
        reconnect: 'persist',
        shared: true
    });

What should I change in order to get rid of this repetition?