From 27fb80757c39b4837a1adc5c86286d58b645c8af Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Wed, 18 Nov 2020 04:25:57 +0000 Subject: [PATCH] Bug 18595: (follow-up) Remove duplicated logic Sponsored-by: The National Library of Finland --- C4/Reserves.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 718d3c0217..50ee7271ec 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1854,12 +1854,7 @@ sub _koha_notify_reserve { my $transports = $messagingpref->message_transport_types if $messagingpref; foreach my $mtt (keys %{$transports}) { my $letter_code = $transports->{$mtt}; - next if ( - ( $mtt eq 'email' and not $to_address ) # No email address - or ( $mtt eq 'sms' and not $patron->smsalertnumber ) # No SMS number - or ( $mtt eq 'itiva' and C4::Context->preference('TalkingTechItivaPhoneNotification') ) # Notice is handled by TalkingTech_itiva_outbound.pl - or ( $mtt eq 'phone' and not $patron->phone ) # No phone number to call - ); + next unless $messagingpref->mtt_deliverable($mtt); &$send_notification($mtt, $letter_code); $notification_sent++; -- 2.17.1