import faye from 'faye';
const client = new faye.Client(config.FAYE_SERVER_URL);
faye.logger = window.console;
client.subscribe(`/user/${user?.id}/subscription`, (msg: string) => {
setLastMessageList([...lastMessageList, msg]);
refreshSubscription();
});
Everything works great when the web browser is online, but I have been trying to test getting missed messages after coming back from offline
1. test to make sure a message is received while online
2. set my connection to "offline"
3. send 2 messages from the publisher
4. set myself back to "online"
At this point I expect to receive the missed messages but nothing happens, even if I send another message, I just get that new one but none of the missed ones.
Is there a piece I'm missing?