From f2961bb2483e988935eb71f98b0cb4c7dc49a6b5 Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Tue, 24 May 2022 12:32:45 +0100
Subject: [PATCH] Bug 30838: Don't fallback through phone numbers for sms

This patch removes the fallback handling for smsalartnumber as the
to_address in notices. We ignore the to_address field in the message
queue at send time for sms anyway and use smsalertnumber exclusively so
having this field populated is just confusing to the end user

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
---
 C4/Message.pm | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/C4/Message.pm b/C4/Message.pm
index 3a3216657b..3ac8f21dc3 100644
--- a/C4/Message.pm
+++ b/C4/Message.pm
@@ -185,9 +185,6 @@ sub _to_address {
             || $borrower->{B_email};
     } elsif ($transport eq 'sms') {
         $address = $borrower->{smsalertnumber}
-            || $borrower->{phone}
-            || $borrower->{phonepro}
-            || $borrower->{B_phone};
     } else {
         warn "'$transport' is an unknown message transport.";
     }
-- 
2.30.2