message trim in chats