discourse/plugins/chat/assets
Joffrey JAFFEUX db558dc3fc
FIX: correctly sort channels with null last message (#23672)
As per 92839dc722 lastMessage won't be null when a message is deleted. This would cause sorting issues when messages from a direct message channels are deleted as we would try to sort on last message and thought it would exist when actually it would be a null message.

I might rethink this design to not return any last_message in this case soon as checking on ID feels dirty and prone to error, so only fixing the issue for now.

This commit is also using `@cached` to avoid replaying the sort logic on each access.
2023-09-26 20:36:51 +02:00
..
javascripts FIX: correctly sort channels with null last message (#23672) 2023-09-26 20:36:51 +02:00
stylesheets DEV: FloatKit (#23650) 2023-09-26 13:39:52 +02:00