From 625b354f8a12b20400766f51576e23baa51b091d 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 (cherry picked from commit e9cdc1da651faa24a93f87569bf2b219f31552ee) Signed-off-by: Lucas Gass --- C4/Letters.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Letters.pm b/C4/Letters.pm index 8ab0bb727e..9a28d66288 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -1490,6 +1490,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