Bug 30838: Set to_address to smsalertnumber at send
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 May 2022 11:57:09 +0000 (12:57 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 22 Jul 2022 17:44:27 +0000 (14:44 -0300)
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>
C4/Letters.pm

index 2220604..d2f0b46 100644 (file)
@@ -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'},