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

CRM-20238 - Create hook for inbound SMS #10347

Merged
merged 3 commits into from
May 21, 2017

Conversation

seamuslee001
Copy link
Contributor

@seamuslee001 seamuslee001 commented May 12, 2017

@seamuslee001
Copy link
Contributor Author

@totten @ineffyble Tim does this look closer to what you were thinking of? Effy do you understand my changes that i've made?

@seamuslee001 seamuslee001 force-pushed the CRM-20238 branch 3 times, most recently from 181c602 to 500e366 Compare May 12, 2017 22:52
@ineffyble
Copy link
Contributor

Looks good to me ✅

$actStatusIDs = array_flip(CRM_Core_OptionGroup::values('activity_status'));
$activityTypeID = CRM_Core_OptionGroup::getValue('activity_type', 'Inbound SMS', 'name');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton stumbled upon another one of these (there were no tests before so Jenkins wasn't getting annoyed)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes - that was part of the cunning plan

@seamuslee001 seamuslee001 force-pushed the CRM-20238 branch 2 times, most recently from 06eceaf to da74a48 Compare May 13, 2017 06:11
@seamuslee001
Copy link
Contributor Author

Jenkins re test this please

@seamuslee001 seamuslee001 force-pushed the CRM-20238 branch 2 times, most recently from d390629 to 8119455 Compare May 15, 2017 00:48
@totten
Copy link
Member

totten commented May 16, 2017

Yup, the hook-signature/class-structure looks better. :)

Copy link
Contributor

@MegaphoneJon MegaphoneJon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! The existing code is smelly - in particular, I suspect formatPhone() should be removed in favor of a solution that uses phone_numeric - but this PR adds tests and is an overall improvement. I particularly like the use of the object to pass to the new hook to avoid locking in a bad function signature on the hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants