From 8f8b34ce27b7fba0b020799e479c75f953b3e9a8 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 23 Feb 2024 14:45:43 +0000 Subject: [PATCH] Bug 23781: (QA follow-up) Implement phone notice in code Signed-off-by: Kyle M Hall --- Koha/Recall.pm | 7 +------ Koha/Recalls.pm | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Koha/Recall.pm b/Koha/Recall.pm index 334dda10024..f898f0335c6 100644 --- a/Koha/Recall.pm +++ b/Koha/Recall.pm @@ -361,12 +361,7 @@ sub set_waiting { my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $self->patron_id, message_name => 'Recall_Waiting' } ); while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) { - if ( $transport eq 'email' ) { - C4::Message->enqueue( $letter, $self->patron, 'email' ); - } - if ( $transport eq 'sms' ) { - C4::Message->enqueue( $letter, $self->patron, 'sms' ); - } + C4::Message->enqueue( $letter, $self->patron, $transport ); } return $self; diff --git a/Koha/Recalls.pm b/Koha/Recalls.pm index dbafc98f238..9f6d14e3640 100644 --- a/Koha/Recalls.pm +++ b/Koha/Recalls.pm @@ -171,12 +171,7 @@ sub add_recall { { borrowernumber => $checkout->borrowernumber, message_name => 'Recall_Requested' } ); while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) { - if ( $transport eq 'email' ) { - C4::Message->enqueue( $letter, $checkout->patron, 'email' ); - } - if ( $transport eq 'sms' ) { - C4::Message->enqueue( $letter, $checkout->patron, 'sms' ); - } + C4::Message->enqueue( $letter, $checkout->patron, $transport ); } $item = Koha::Items->find( $itemnumber ); -- 2.30.2