Skip to content

Commit

Permalink
Merge pull request #37 from MangaClova/features/fixerror
Browse files Browse the repository at this point in the history
Clovaが古い位置情報だと判断するための閾値を開く設定できるように変更
  • Loading branch information
runceel committed Oct 8, 2018
2 parents 36698ef + 46183ab commit 8abfe29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions WhereAreYouApp/AppConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static AppConfiguration GetConfiguration(ExecutionContext context)
}

public MessagingApi MessagingApi { get; set; }
public Clova Cek{ get; set; }
}

public class MessagingApi
Expand All @@ -44,6 +45,11 @@ public class MessagingApi

public class Clova
{
public static string IsBeforeThresholdDefaultValue { get; } = "05:00";
public string ExtensionId { get; set; }
/// <summary>
/// Format: HH:mm
/// </summary>
public string IsBeforeThreshold { get; set; }
}
}
2 changes: 1 addition & 1 deletion WhereAreYouApp/Clova.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private static async Task<IActionResult> 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));
Expand Down

0 comments on commit 8abfe29

Please sign in to comment.