2 json.from_user_id message.from_user_id
3 json.from_display_name message.sender.display_name
4 json.to_user_id message.to_user_id
5 json.to_display_name message.recipient.display_name
6 json.title message.title
7 json.sent_on message.sent_on.xmlschema
9 if current_user.id == message.from_user_id
10 json.deleted !message.from_user_visible
11 elsif current_user.id == message.to_user_id
12 json.message_read message.message_read
13 json.deleted !message.to_user_visible
16 json.body_format message.body_format
17 json.body message.body unless @skip_body