From 8108700f67ddbe1724ee0b1000d9e55a844f6f28 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 30 十一月 2021 15:32:42 +0800
Subject: [PATCH] 提测版本

---
 SiriIntents/HDLRunSceneIntentHandlder.cs |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/SiriIntents/HDLRunSceneIntentHandlder.cs b/SiriIntents/HDLRunSceneIntentHandlder.cs
index b053f56..6d260c2 100644
--- a/SiriIntents/HDLRunSceneIntentHandlder.cs
+++ b/SiriIntents/HDLRunSceneIntentHandlder.cs
@@ -29,14 +29,14 @@
                 }
                 else
                 {
-                    var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+                    var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
                     if (NSLocale.PreferredLanguages[0].Contains("zh-"))
                     {
                         rsp.SuccessMessage = "璐﹀彿鏈櫥褰�";
                     }
                     else
                     {
-                        rsp.SuccessMessage = "Not logged in to the app";
+                        rsp.SuccessMessage = "Not logged in to the app.";
                     }
                     completion(rsp);
                 }
@@ -55,6 +55,21 @@
             {
                 if (Server.HttpServerRequest.Ins.DataManager.IsLgoin)
                 {
+                    if(Server.HttpServerRequest.Ins.DataManager.HomeId!= intent.HomeId)
+                    {
+                        var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
+                        if (NSLocale.PreferredLanguages[0].Contains("zh-"))
+                        {
+                            rsp.SuccessMessage = "浣忓畢涓嶅尮閰�";
+                        }
+                        else
+                        {
+                            rsp.SuccessMessage = "Residential mismatch.";
+                        }
+                        completion(rsp);
+                        return;
+                    }
+
                     var result = "-1";
                     if (intent.ControlType == "1")
                     {
@@ -78,34 +93,34 @@
                         }
                         else
                         {
-                            rsp.SuccessMessage = "Successful execution";
+                            rsp.SuccessMessage = "Successful execution ";
                         }
                         completion(rsp);
                     }
                     else
                     {
-                        var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+                        var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
                         if (NSLocale.PreferredLanguages[0].Contains("zh-"))
                         {
                             rsp.SuccessMessage = "鎵ц澶辫触";
                         }
                         else
                         {
-                            rsp.SuccessMessage = "Execution failed";
+                            rsp.SuccessMessage = "Execution failed.";
                         }
                         completion(rsp);
                     }
                 }
                 else
                 {
-                    var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+                    var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
                     if (NSLocale.PreferredLanguages[0].Contains("zh-"))
                     {
                         rsp.SuccessMessage = "璐﹀彿鏈櫥褰�";
                     }
                     else
                     {
-                        rsp.SuccessMessage = "Not logged in to the app";
+                        rsp.SuccessMessage = "Not logged in to the app.";
                     }
                     completion(rsp);
                 }

--
Gitblit v1.8.0