From 61cc57fe4f4287be4f6ab3690736d3b993827741 Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Tue, 31 Dec 2019 13:45:14 -0800 Subject: [PATCH] Use basestation.sqb for backup registration info. --- src/main/lemondronor/circlebot.cljs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/lemondronor/circlebot.cljs b/src/main/lemondronor/circlebot.cljs index 249b627..d18ee96 100644 --- a/src/main/lemondronor/circlebot.cljs +++ b/src/main/lemondronor/circlebot.cljs @@ -277,6 +277,7 @@ [(str "[{registration}|{registration}, {type|a-an},|{militaryregistration}, a military aircraft,|" "{militaryregistration}, a military {type},|" "Aircraft with unknown registration, ICAO {icao}|" + "{type} with unknown registration, ICAO {icao}" "Military aircraft with unknown registration, ICAO {militaryicao}] " "?:[(callsign {callsign}) ]" "is circling over [{neighbourhood}, {locality}|{neighbourhood}, {county}|{locality}] " @@ -314,6 +315,8 @@ info (cond-> (-> ac (dissoc :history :type) (merge rev-props)) (:Type sqb) (assoc :type (:Type sqb)) + (as-> rec (and (nil? (:registration rec)) (:Registration sqb))) + (assoc :registration (:Registration sqb)) (:military? ac) (-> (assoc :militaryregistration (:registration ac) :militaryicao (:icao ac)))