I have done another round of code cleanup with this module and have attached a patch file. It looks like a lot but in the end is mainly white space handling. However, some smaller functional improvements should be included as well.

The patch is based on the Sep 25 dev release.

Hope this is helpful and I'd appreciate if you wanted to include this into the your module.

CommentFileSizeAuthor
drupalchat_cleanup.patch72.6 KBjurgenhaas
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

darklrd’s picture

Thanks a lot jurgenhaas! :-) I will commit it.

darklrd’s picture

Awesome update :-D

It seems like in your patch that we receive our own messages from the polling and later on they are removed. How is this better than not sending the messages at all?

jurgenhaas’s picture

Yes, there have been issues reported here in the queue that your own posts haven't been displayed at all after a page reload and the quickest way to resolve that was to pull your own posts from the server as well like the posts from the other person in the chat. The problem then was, that you had your own messages as a duplicate right after sending a new message (=before the page reload or page change). So I thought it's simple to mark your own post with a css class and remove them once we've received all posts from the server.

Is that something to stick with or is there a better solution around?