mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-01 02:20:16 +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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue