Sort messages in history by ID instead of date