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 if current_user.id == message.from_user_id
12 attrs["deleted"] = !message.from_user_visible
13 elsif current_user.id == message.to_user_id
14 attrs["message_read"] = message.message_read
15 attrs["deleted"] = !message.to_user_visible
18 xml.message(attrs) do |nd|
19 nd.title(message.title)
20 nd.body(message.body) unless @skip_body