Is it possible to show the old messages in chat window like facebook does. This is important because when refreshing the page unread messages are lost.

Comments

rgnyldz’s picture

So, not possible ?

rgnyldz’s picture

At least an answer would be nice !

darklrd’s picture

Yes, this needs to be developed.

Thanks!

darklrd’s picture

Marked #2319481: chat history lost on navigation as duplicate of this issue. Thanks.

oneblankspace’s picture

Version: 7.x-1.0 » 7.x-1.3
ey’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Category: Feature request » Bug report
Priority: Normal » Major

This functionality was once there. It is somehow lost with recent updates, but I don't know exactly by which update. So this is not a feature request, but a bug report. It is also a major issue since the messages are lost, and the users have no obvious way to know if someone wrote to them and what they wrote at all, which makes this module simply useless.

I know that also in the past the chat window kept the chat history for the active session at least, and open chat windows stayed also opened. Now all active chats are also being closed if the user navigates to another page or simply refreshes the page.

ey’s picture

I've just rolled back one by one each releases and found that the latest version where the chat history still kept was drupalchat 7.x-1.0-beta33

If you install drupalchat 7.x-1.0-beta33, you'll see that it works. So this bug is introduced on drupalchat 7.x-1.0

I'll take a look and try to find which commit exactly is responsible.

ey’s picture

I've found the commit that breaks the things:

http://drupalcode.org/project/drupalchat.git/commit/c1b8a4e
on June 18, 2014 16:18 by darklrd: support all versions of jQuery

This is a very big commit which makes it very hard to debug. @darklrd would you please take a closer look at your commit, maybe you can find it quickly why it breaks the chat history staying alive?

Thanks.

pendaco’s picture

It is also a major issue since the messages are lost, and the users has no obvious way to know if someone wrote to them and what they wrote at all, which makes this module simply useless.

Agreed with pc-wurm

ey’s picture

For those who want to install the older version (7.x-1.0-beta33), which is working better, install from the following url:

https://www.drupal.org/node/2275587

webadpro’s picture

Hello,

Is this caused only when using AJAX or even with node.js?

Thanks

darklrd’s picture

Earlier cookies were being used to persist chat messages in the window but this is not a good solution security wise. Hence this has been removed in stable release. A new workflow needs to be designed to get old messages from website server on page load. This may take time to be implemented.

  • darklrd committed aef6300 on 7.x-1.x
    Issue #2296905 by darklrd: Show old messages.
    
darklrd’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.