3 "from_user_id" => message.from_user_id,
4 "from_display_name" => message.sender.display_name,
5 "to_user_id" => message.to_user_id,
6 "to_display_name" => message.recipient.display_name,
7 "sent_on" => message.sent_on.xmlschema,
8 "body_format" => message.body_format
11 attrs["message_read"] = message.message_read if current_user.id == message.to_user_id
13 if current_user.id == message.from_user_id
14 attrs["deleted"] = !message.from_user_visible
15 elsif current_user.id == message.to_user_id
16 attrs["deleted"] = !message.to_user_visible
19 xml.message(attrs) do |nd|
20 nd.title(message.title)
21 nd.body(message.body) unless @skip_body