Skip to content

Commit

Permalink
Logs all faye incoming messages
Browse files Browse the repository at this point in the history
Signed-off-by: Akash Manohar J <akash@akash.im>
  • Loading branch information
HashNuke committed Mar 27, 2012
1 parent 04e30ec commit 9352108
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .bushido/emails/example_email_1.yml
@@ -0,0 +1,33 @@
# Email format description
#
# 'name': - name of the email template (used with `tane email 'name'`)
# recipient - Recipient of the message as reported by MAIL TO during SMTP chat.
# sender - Sender of the message as reported by MAIL FROM during SMTP chat. Note- this value may differ from From MIME header.
# from - Sender of the message as reported by From message header, for example Example Sender <example.sender@example.org>".
# subject - Subject string.
# body-plain - Text Version of the email. This field is always present. If the incoming message only has HTML body, this will be the text representation of it.
# stripped-text - Text Version of the message without quoted parts and signature block (if found).
# stripped-signature - The Signature block stripped from the plain text message (if found).
# body-html - HTML version of the message, if message was multipart. Note that all parts of the message will be posted, not just text/html. For instance if a message arrives with "foo" part it will be posted as "body-foo".
# stripped-html - HTML version of the message, without quoted parts.
# attachment-count - How many attachments the message has.
# attachment-x - Attached file ('x' stands for number of the attachment). Attachments are handled as file uploads, encoded as multipart/form-data.
# timestamp - Number of second passed since January 1, 1970


---
example_email_1:
recipient: postmaster@your-app-name.gobushido.com
sender: sender@example.org
from: Example Sender <example.sender@example.org>
subject: hello
body-plain: Example plain body with no HTML, but with all the quoted conversations
stripped-text: Example stripped text, with no HTML, quotes, or signature
stripped-signature: Example stripped signature with no HTML
body-html: Example body containing <a href='http://example.org'>HTML</a>, and all
of the quotes
stripped-html: ! 'Example body containing <a href=''http://example.org''>HTML</a>,
but no quotes or signature '
attachment-count: How many attachments the email has
attachment-1: binary blob of file to be sent as attachment-1
timestamp: '1323286600'
35 changes: 35 additions & 0 deletions .bushido/tane.yml
@@ -0,0 +1,35 @@
---
APP_TLD: bushi.do
BUNDLE_WITHOUT:
BUSHIDO_APP: valiant-owl-8011
BUSHIDO_APP_KEY: fbb73e00-5a56-012f-9dcd-123139107c37
BUSHIDO_DOMAIN: valiant-owl-8011.bushi.do
BUSHIDO_EVENTS:
BUSHIDO_HOST: bushi.do
BUSHIDO_NAME: valiant-owl-8011
BUSHIDO_PROJECT_NAME: tane
BUSHIDO_SALT: rynda2tY8gKF3v9d60Gn5aXnVm8DFESk7QZb2t2HQ0rkW0cp6ajm5kWsfsmPeOVU
BUSHIDO_SUBDOMAIN: valiant-owl-8011
B_SQL_DB: valiant_owl_8011
B_SQL_PASS: d3b97d563adcbe204e2694cf68cffbe26106f84a
B_SQL_USER: valiant_owl_8011
DATABASE_URL:
HOSTING_PLATFORM: bushido
LANG:
PUBLIC_URL: http://valiant-owl-8011.gobushido.com
RACK_ENV:
RAILS_ENV: development
S3_ACCESS_KEY_ID:
S3_ARN:
S3_BUCKET:
SHARED_DATABASE_URL:
S3_PREFIX: valiant-owl-8011
S3_SECRET_ACCESS_KEY:
STS_SESSION_TOKEN:
SMTP_AUTHENTICATION: plain
SMTP_DOMAIN: valiant-owl-8011.gobushido.com
SMTP_PASSWORD: rynda2tY8gKF3v9d60Gn5aXnVm8DFESk
SMTP_PORT: '25'
SMTP_SERVER: smtp.mailgun.org
SMTP_TLS: 'true'
SMTP_USER: postmaster@valiant-owl-8011.gobushido.com
Expand Up @@ -28,6 +28,7 @@ class Kandan.Broadcasters.FayeBroadcaster

subscribe: (channel)->
subscription = @faye_client.subscribe channel, (data)=>
console.log "faye", data
Kandan.Helpers.Channels.add_activity(data)
subscription.errback(()->
alert "Oops! could not connect to the server"
Expand Down

0 comments on commit 9352108

Please sign in to comment.