Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Process HTC Sensation footers.

  • Loading branch information...
commit 797932b89dd4c94796e0acc1ea26d7d7f1f9095f 1 parent 2433b37
@monde authored
Showing with 4 additions and 0 deletions.
  1. +3 −0  conf/mms2r_media.yml
  2. +1 −0  test/test_mms2r_media.rb
View
3  conf/mms2r_media.yml
@@ -3,6 +3,7 @@ ignore:
text/plain:
- !ruby/regexp /^\(no subject\)$/i
- !ruby/regexp /\ASent (via|(from (my|your))) /im
+ - !ruby/regexp /\AFrom my HTC /im
- !ruby/regexp /\ASent on the Sprint.* Now Network.*$/im
multipart/mixed:
- !ruby/regexp "/^Attachment: /i"
@@ -10,6 +11,8 @@ transform:
text/plain:
- - !ruby/regexp /\A(.*?)Sent (via|(from (my|your))) .*/im
- "\\1"
+ - - !ruby/regexp /\A(.*?)From my HTC .*/im
+ - "\\1"
- - !ruby/regexp /\A(.*?)\s+image\/jpeg$/im
- "\\1"
- - !ruby/regexp /\A(.*?)Sent on the Sprint.* Now Network.*$/im
View
1  test/test_mms2r_media.rb
@@ -193,6 +193,7 @@ def test_transform_text_plain
assert_equal result, mms.transform_text(type, text)
# testing the default config
+ assert_equal ['text/plain', ''], mms.transform_text('text/plain', "From my HTC Sensation 4G on T-Mobile. The first nationwide 4G network")
assert_equal ['text/plain', ''], mms.transform_text('text/plain', "Sent from my Windows Phone")
assert_equal ['text/plain', ''], mms.transform_text('text/plain', "Sent via BlackBerry from T-Mobile")
assert_equal ['text/plain', ''], mms.transform_text('text/plain', "Sent from my Verizon Wireless BlackBerry")
Please sign in to comment.
Something went wrong with that request. Please try again.