]> git.koha-community.org Git - koha.git/commit
Bug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 27 May 2021 13:53:01 +0000 (09:53 -0400)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 12 Nov 2021 22:32:45 +0000 (12:32 -1000)
commitdbde899421752124d1271ddb53d0982ec7cd4785
treed24632325848ee6f2e955a3ba6671fea8b325e8d
parent9f45361c01b246a5e490bdebd67303072802e7e9
Bug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks

It would be useful to send most of the process_message_queue.pl script parameters to any plugin before_send_messages hooks. For example, the Twilio Voice plugin uses before_send_messages to send phone messages, but if the script is called with "-t email", it doesn't know and will make phone calls! If that info were passed in, the plugin could be made aware of it and only make calls if no "-t" or a "-t phone" were set in the parameters.

Test Plan:
1) Apply this patch
2) Install Kitchen Sink plugin v2.2.0 or later
   https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases/download/v2.2.0/dev-koha-plugin-kitchen-sink-2.2.0.kpz
3) Run misc/cronjobs/process_message_queue.pl with any or all non-email
   related paramters
4) Note the plugin output shows the parameters were passed to the plugin

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f386c8ce85f5a8f0f0e42dd089b8226659e017a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/cronjobs/process_message_queue.pl