Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

[Feature] Chat Log on Client side #8

Open
hjanuschka opened this issue Sep 29, 2016 · 5 comments
Open

[Feature] Chat Log on Client side #8

hjanuschka opened this issue Sep 29, 2016 · 5 comments

Comments

@hjanuschka
Copy link

is it possible to enable chat-log/history on client side, based on a cookie?

e.g: user chats to me, writes a issue, he then reloads the page, i reply via admin interface, he never gets the reply.

nice project, if it is not possible right, now i may do a pr

regards

@juliancwirko
Copy link
Owner

juliancwirko commented Sep 29, 2016

Hi, yes it needs something like that. For now it is impossible to use it on websites which aren't single page apps like those angular, react based apps. I think we need to store user's uniq id (called userSessionId) in the browser's localstorage and then reconnect the session on reload if it exists in localstorage instead of creating the new one. This could be some more work, but of course if you want you can send PR. We would need to do this for Blaze package and also static js logic. Thanks.

@juliancwirko juliancwirko changed the title Chat Log on Client side [Feature] Chat Log on Client side Dec 9, 2016
@juliancwirko
Copy link
Owner

From version 1.2.0 the chat history preserves after website refresh or changing routes, it will create new session only when you close and reopen your website

@juliancwirko
Copy link
Owner

juliancwirko commented Feb 2, 2017

I'll close it for now. It is implemented. If you want you can still comment in this topic. Thanks!

@anedisi
Copy link

anedisi commented Feb 6, 2017

what about using localstorage instead of sessionstorage.

if i open a new tab with sessionstorage im creating a new session id and with a localstorage im using the old one.

in ui it would look like im starting a new chat with sessionstorage and resuming a chat with localstorage. some people open multiple tabs

now the problem is when to clear the sessionid from localstorage.

@juliancwirko
Copy link
Owner

Yes, you're right it might be problematic. I need to think about it.

@juliancwirko juliancwirko reopened this Feb 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants