diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 2def20f..2ddea05 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -8,3 +8,6 @@ MANIFEST.SKIP RT-Extension-SMSNotify-.* \..*\.swp README.md +Makefile +MYMETA.json +MYMETA.yml \ No newline at end of file diff --git a/lib/RT/Extension/SMSNotify.pm b/lib/RT/Extension/SMSNotify.pm index d56039c..3b2716e 100644 --- a/lib/RT/Extension/SMSNotify.pm +++ b/lib/RT/Extension/SMSNotify.pm @@ -101,9 +101,14 @@ C. =head2 $SMSNotifyGetPhoneForUserFn -This config-overridable method is useful for filtering users to limit the -recipients of a message. For example, you might want to return a user's phone -number only when their local time is between 08:00 and 17:00. +By default, notifications will use the Pager number defined on the RT +user record of recipients. This behavior can be overriden to support +additional logic. + +Setting a custom method via C<$SMSNotifyGetPhoneForUserFn> is useful for +filtering users to limit the recipients of a message. For example, you +might want to return a user's phone number only when their local time +is between 08:00 and 17:00. If set, this variable must be either a function reference or a string that names a module with a function named GetPhoneForUser. In either case the variable is set diff --git a/lib/RT/Extension/SMSNotify/OnShift.pm b/lib/RT/Extension/SMSNotify/OnShift.pm index 35abdb3..c21438b 100644 --- a/lib/RT/Extension/SMSNotify/OnShift.pm +++ b/lib/RT/Extension/SMSNotify/OnShift.pm @@ -89,7 +89,7 @@ See the configuration section and L. sub GetPhoneForUser { # Cache the custom field on first use to avoid repeat lookups if (!defined($cf)) { - $cf = RT::CustomField->new( RT::SystemUser ); + $cf = RT::CustomField->new( RT->SystemUser ); $cf->Load('ShiftCode'); }