Moved text wrapping before storage in DB to reduce complexity of message handling.