Right now the most recent messages appear on the bottom of the chat and chatlog; how can I change the order to most recent on top? I've been looking through your code and found just 1 line of code that has something to do with this (array_reverse), but when I logically change this (what I think is logical), nothing changes.

Please point me into the right direction, thanks, and thanks for this module of course :)

Comments

doitDave’s picture

Title: order of chat messages » order of chat
Version: 7.x-1.3 » 7.x-1.x-dev
Category: support » feature
Priority: Normal » Minor
Status: Active » Postponed

The internal message handling is not as simple as it seems. This is due to several caching and other issues. However, the actual display is done at the very end of a rather tricky chain of DB calls, caching, PHP and (if enabled) JS processing. At this point I have to admit that a lot of that processing is still somewhat legacy from the Drupal 5 release and IMO needs substantial refactoring before adding more new features (see #2105853: General code refactoring).

That said, I will not deny your request, but I would like to postpone it until that cleanup has been done. I plan to turn the internals into being a lot more "drupalish", that is, adding theme support, support for hook_query_alter etc. Maybe this will already offer new options to override a lot of things and even better options for contrib modules.

Does assigning the issue to yourself mean that you would like to implement some contribution?

doitDave’s picture

Title: order of chat » order of chat messages
becometa’s picture

+1
option to reorder messages would be really handy...
because as of now: displaying older messages at the top of the box does not really make sense

mhmhartman’s picture

Thanks a lot diotDave. Keep up the good work!

doitDave’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)

I lack the time to work on this myself. If someone is willing to provide a patch, feel free to reopen. Sorry!