Bug 30838: Set to_address to smsalertnumber at send

It may be helpful to know exactly what number was used for the sms alert
that was sent. As such, we should ensure it's set at the time of
sending.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e9cdc1da65)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 625b354f8a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Martin Renvoize 2022-05-24 12:57:09 +01:00 committed by Arthur Suzuki
parent 6fe74607d1
commit bcc36081f4
1 changed files with 1 additions and 0 deletions

View File

@ -1488,6 +1488,7 @@ sub _is_duplicate {
sub _send_message_by_sms {
my $message = shift or return;
my $patron = Koha::Patrons->find( $message->{borrowernumber} );
_update_message_to_address($message->{message_id}, $patron->smsalertnumber) if $patron;
unless ( $patron and $patron->smsalertnumber ) {
_set_message_status( { message_id => $message->{'message_id'},