From bcc36081f4e27f5569be2d49fce7e3ba9ff153d2 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 (cherry picked from commit 625b354f8a12b20400766f51576e23baa51b091d) Signed-off-by: Arthur Suzuki --- C4/Letters.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Letters.pm b/C4/Letters.pm index 3d92defc47..64abef0456 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -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'}, -- 2.39.5