-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Conversation
seamuslee001
commented
May 12, 2017
•
edited by civicrm-builder
Loading
edited by civicrm-builder
- CRM-20238: Hook for inbound SMS messages
@totten @ineffyble Tim does this look closer to what you were thinking of? Effy do you understand my changes that i've made? |
181c602
to
500e366
Compare
Looks good to me ✅ |
CRM/SMS/Provider.php
Outdated
$actStatusIDs = array_flip(CRM_Core_OptionGroup::values('activity_status')); | ||
$activityTypeID = CRM_Core_OptionGroup::getValue('activity_type', 'Inbound SMS', 'name'); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
06eceaf
to
da74a48
Compare
Jenkins re test this please |
d390629
to
8119455
Compare
…nd Paramatise a little Further use of new Message object
Yup, the hook-signature/class-structure looks better. :) |
There was a problem hiding this 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.