mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-24 08:04:08 +01:00
MMS prepends a 1 that needs to get stripped
This commit is contained in:
parent
920507441d
commit
dc0c5bffa4
2 changed files with 4 additions and 2 deletions
|
|
@ -2,7 +2,9 @@ class SMSGateway < ActionMailer::Base
|
|||
CONTEXT_NAME = 'Inbox'
|
||||
def receive(email)
|
||||
user = User.find(:first, :include => [:preference], :conditions => ["preferences.sms_email = ?", email.from[0].strip])
|
||||
logger.info "Receiving SMS task from #{email.from[0].strip} For user #{user.nil? nil : user.login}"
|
||||
if user.nil?
|
||||
user = User.find(:first, :include => [:preference], :conditions => ["preferences.sms_email = ?", email.from[0].strip[1,100]])
|
||||
end
|
||||
return if user.nil?
|
||||
context = user.prefs.sms_context
|
||||
|
||||
|
|
|
|||
2
test/fixtures/sample_mms.txt
vendored
2
test/fixtures/sample_mms.txt
vendored
|
|
@ -1,6 +1,6 @@
|
|||
Return-Path: <15555555555/TYPE=PLMN@tmomail.net>
|
||||
Date: Fri, 6 Jun 2008 21:38:26 -0400
|
||||
From: 5555555555@tmomail.net
|
||||
From: 15555555555@tmomail.net
|
||||
To: gtd@tracks.com
|
||||
Message-ID: <3645873.13759311212802713215.JavaMail.mms@rlyatl28>
|
||||
Subject: This is the subject
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue