mongodb messaging schema design

I'm currently working on a nodejs & mongodb project where I'm to implement a Instant Messaging feature to the website between users. What I need help with is the object structure to be stored in our mongodb database.

Requirements are:

  • any user of website should be able to send a message to another user
  • messages should be grouped in threads similar to forum, where each thread is created when a user sends a message to another user via its presentation page
  • sender and/or recipient should be able to reply to a thread
  • even if recipient/sender removes entire thread (or just a specific message in that thread), other user should still see all messages (if he/she does not delete them)
  • each user have Inbox , Sent, Trash like common mail box

This is what I have so far

messages:[{
    '_id'   : '502c21e3833ea71307001d56',
    'from'  :  {
                    '_id': '503fdbfa294f6db74de649ea',
                    'name': 'Kumar'
    },
    'to'    : {
            '_id'   : '5061e2a61ac427f716000378',
            'name'  : 'Elan'
    },
    'subject'   : 'sit amet consectetur',
    'message'   : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
    'sent'      : '2012-09-26T18:04:26.656Z',
    'last_reply': '2012-09-26T18:04:26.656Z',
    'reply'     : [
                {
                    'content': 'dolor sit amet consectetur adipiscing elit.',
                    'to': {
                        '_id': '503fdbfa294f6db74de649ea',
                        'name': 'Kumar'
                    },
                    'from'  :  {
                        '_id': '5061e2a61ac427f716000378',
                        'name': 'Elan'
                    },
                    'date': '2012-09-26T18:04:26.656Z'
                },
                {
                    'content': 'consectetur adipiscing elit. ',
                    'to': {
                        '_id': '5061e2a61ac427f716000378',
                        'name': 'Elan'
                    },
                    'from'  :  {
                        '_id': '503fdbfa294f6db74de649ea',
                        'name': 'Kumar'
                    },
                    'date': '2012-09-26T18:04:26.656Z'
                }
            ]

}]

messages_user_mapping

 messages_user_mapping : [{
        '_id'   : '502c21e3833ea71307001222',
        'msg_id' : '502c21e3833ea71307001d56',
        'user' : {
                '_id': '503fdbfa294f6db74de649ea',
                'name': 'Kumar'
            },
        'sent' : '1',
        'inbox': '0',
        'trash': '0',
        'soft_delete':{
            'msg_id' : '502c21e3833ea71307001d56',
            'from'  : 'inbox'
        }
    },
    {
        '_id'   : '502c21e3833ea71307001222',
        'msg_id' : '502c21e3833ea71307001d56',
        'user' : {
                '_id': '5061e2a61ac427f716000378',
                'name': 'Elan'
            },
        'sent' : '0',
        'inbox': '1',
        'trash': '0',
        'soft_delete':{
            'msg_id' : '',
            'from'  : ''
        }
    }
    ]

I am looking for better schema structure.