diff options
| author | Teddy Wing | 2014-06-08 12:41:41 -0400 |
|---|---|---|
| committer | Teddy Wing | 2014-06-08 12:41:41 -0400 |
| commit | 30aed87e9e78c82fb2df528d0f37967469aa0cdb (patch) | |
| tree | 76a0e3074a927bbf330b84f33e010fda080e2878 /fancy_bear/contextio | |
| parent | 12477d778030901fe69e001ca9d1a856ccfd11ce (diff) | |
| parent | dbdf6a3486a3456b6a6d4fc4f2c5973113015109 (diff) | |
| download | sellevate-develop.tar.bz2 | |
Diffstat (limited to 'fancy_bear/contextio')
| -rw-r--r-- | fancy_bear/contextio/message.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/fancy_bear/contextio/message.rb b/fancy_bear/contextio/message.rb index bae9be4..abf4a09 100644 --- a/fancy_bear/contextio/message.rb +++ b/fancy_bear/contextio/message.rb @@ -25,8 +25,23 @@ module FancyBear messages end - def get + def get(id) + output = {} + message = @account.messages.where(:message_id => id).first + output['from_address'] = message.from['email'] + output['from_name'] = message.from['name'] + output['subject'] = message.subject + output['timestamp'] = message.date + output['labels'] = message.folders + + message.body_parts.each do |p| + if p.content + output['html'] = p.html? + output['content'] = p.content + end + end + output end end |
