From 46183ab86a0c48d91f2f0f2b04ade06b29b8c6f6 Mon Sep 17 00:00:00 2001 From: Kazuki Ota Date: Mon, 8 Oct 2018 11:07:55 +0900 Subject: [PATCH] =?UTF-8?q?Clova=E3=81=8C=E5=8F=A4=E3=81=84=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E6=83=85=E5=A0=B1=E3=81=A0=E3=81=A8=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81=E3=81=AE=E9=96=BE=E5=80=A4?= =?UTF-8?q?=E3=82=92=E9=96=8B=E3=81=8F=E8=A8=AD=E5=AE=9A=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WhereAreYouApp/AppConfiguration.cs | 6 ++++++ WhereAreYouApp/Clova.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/WhereAreYouApp/AppConfiguration.cs b/WhereAreYouApp/AppConfiguration.cs index 75b0ce1..755ca32 100644 --- a/WhereAreYouApp/AppConfiguration.cs +++ b/WhereAreYouApp/AppConfiguration.cs @@ -34,6 +34,7 @@ public static AppConfiguration GetConfiguration(ExecutionContext context) } public MessagingApi MessagingApi { get; set; } + public Clova Cek{ get; set; } } public class MessagingApi @@ -44,6 +45,11 @@ public class MessagingApi public class Clova { + public static string IsBeforeThresholdDefaultValue { get; } = "05:00"; public string ExtensionId { get; set; } + /// + /// Format: HH:mm + /// + public string IsBeforeThreshold { get; set; } } } diff --git a/WhereAreYouApp/Clova.cs b/WhereAreYouApp/Clova.cs index 0657b8c..e2ceeee 100644 --- a/WhereAreYouApp/Clova.cs +++ b/WhereAreYouApp/Clova.cs @@ -59,7 +59,7 @@ private static async Task ExecuteLaunchRequestAsync(CEKRequest re return new OkObjectResult(response); } - if (DateTimeOffsetUtils.IsBefore(locationLog.Timestamp, TimeSpan.FromHours(6))) + if (DateTimeOffsetUtils.IsBefore(locationLog.Timestamp, TimeSpan.Parse(config.Cek.IsBeforeThreshold ?? Clova.IsBeforeThresholdDefaultValue))) { // ŒÃ‚¢‚Æ‚« response.AddText(ClovaMessages.GetOldLocationMessage(settings.YourName, locationLog));