Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@zamiang => Prevent flooding recipients with SMS messages. #12

Merged
merged 1 commit into from Sep 11, 2014

Conversation

@dblock
Copy link
Contributor

dblock commented Sep 10, 2014

This uses memcached to store which numbers have been sent messages to for a few minutes. Then displays an annoying message if you try to resend it.

screen shot 2014-09-10 at 6 55 27 pm

@@ -23,9 +23,9 @@ describe 'SmsView', ->

describe '#submit', ->

it 'sends a twilio API call upon submit', ->
xit 'sends a twilio API call upon submit', ->

This comment has been minimized.

Copy link
@dblock

dblock Sep 10, 2014

Author Contributor

I commented this out cause I cannot get it to work.

@dblock dblock force-pushed the dblock:dont-send-dup-sms branch from 0c630a4 to a732ea9 Sep 11, 2014
@dblock

This comment has been minimized.

Copy link
Contributor Author

dblock commented Sep 11, 2014

I rebased this PR, ready to go, 💚.

if error
res.json data.status || 400, { success: false, code: data.code, message: data.message }
phone_number = req.body.phone_number.replace(/[^\d\+]/g, "")
cache = memjs.Client.create()

This comment has been minimized.

Copy link
@dblock

dblock Sep 11, 2014

Author Contributor

I tried to make this global somehow, but I had hard time stubbing it in tests. Also I don't think it matters.

zamiang added a commit that referenced this pull request Sep 11, 2014
@zamiang => Prevent flooding recipients with SMS messages.
@zamiang zamiang merged commit f797b8d into artsy:master Sep 11, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@dblock dblock deleted the dblock:dont-send-dup-sms branch Sep 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.