DoSomethingArchive / gambit-content

:black_joker: Content API for Gambit
MIT License
2 stars 5 forks source link

User Registration Source Change #694

Closed jamjensen closed 7 years ago

jamjensen commented 7 years ago

When a new member signs up via SMS and interacts with CampaignBot their user registration source is still sms-mobilecommons, not sms.

aaronschachter commented 7 years ago

This has been deployed to production in 2.6.0 cc @jessleenyc

aaronschachter commented 7 years ago

The User Registration source can be updated without code changes via the Gambit DS_API_USER_REGISTRATION_SOURCE config variable.

cc @sheyd

jessleenyc commented 7 years ago

Documented from a slack convo: Questions -

Aaron Schachter [10:10 PM]
i'm not sure (and totally not trying to make work for anyone on a friday night, just wanted to link to that issue while i saw it) -- Gambit creates users by posting to the Northstar API, but that post request also creates a Phoenix user -- my guess (but i don't know for sure) is the source we post to Northstar would end up as the same source in Phoenix when NS creates the Phoenix User

Jess Lee [10:20 PM]
@aaron sorry, didn’t see this until I posted another Q in #quasar — how do we find out how the phoenix user is created? I was talking to @dave earlier and I don’t think creating a NS user creates a phoenix user? (edited)

[10:21]
We’re basically looking for three sms-mobilecommons sources now: 1)Northstar source 2) Phoenix registration source 3) Phoenix sign up source (if they sign up for a campaign)

Aaron Schachter [10:31 PM]
i was about to answer in #quasar but i can answer here, although the broadcast-no question is a good one.

When Gambit creates a NS user, we do create a Phoenix User, because we pass a create_drupal_user flag. we need to do this because we need a phoenix UID to post a Signup or Reportback.

Current plan is that even if a user says no to a broadcast, we'll still create a NS User for them because any request to the Gambit chatbot endpoint authenticates the given mobile # against NS. If a User exists, that's the ID -- if it doesn't, we create a NS User.