From e9cdc1da651faa24a93f87569bf2b219f31552ee Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 24 May 2022 12:57:09 +0100 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- C4/Letters.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Letters.pm b/C4/Letters.pm index 22206045e0..d2f0b469ca 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -1494,6 +1494,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'}, -- 2.39.5