From c0e022cd8383349dfaa8fe5382436e7327ef7bd7 Mon Sep 17 00:00:00 2001 From: Matt Lyons Date: Tue, 26 Sep 2023 12:00:30 -0500 Subject: [PATCH] PR updates --- c-sharp/NetworkObjects/DataProvider.cs | 6 +++++- c-sharp/Projects/ParatextProjectStorageInterpreter.cs | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/c-sharp/NetworkObjects/DataProvider.cs b/c-sharp/NetworkObjects/DataProvider.cs index a7840e1c46..f9a3ccfa08 100644 --- a/c-sharp/NetworkObjects/DataProvider.cs +++ b/c-sharp/NetworkObjects/DataProvider.cs @@ -84,7 +84,11 @@ protected void SendDataUpdateEvent(dynamic? dataScope) string scopeString; if ((dataScope is string s) && !string.IsNullOrWhiteSpace(s)) - scopeString = s; + { + // If we are returning "*", just pass it as a string. Otherwise we have to provide a JSON list of strings. + // Presumably this will change as part of https://github.com/paranext/paranext-core/issues/443 + scopeString = (s == "*") ? s : JsonConvert.SerializeObject(new List { s }); + } else if (dataScope != null) { try diff --git a/c-sharp/Projects/ParatextProjectStorageInterpreter.cs b/c-sharp/Projects/ParatextProjectStorageInterpreter.cs index 3a32ccf407..ce6a064851 100644 --- a/c-sharp/Projects/ParatextProjectStorageInterpreter.cs +++ b/c-sharp/Projects/ParatextProjectStorageInterpreter.cs @@ -133,7 +133,8 @@ public override ResponseToRequest SetProjectData(ProjectDataScope scope, string ); } ); - return ResponseToRequest.Succeeded($"{Chapter}:{verseRef}"); + // The value of returned string is case sensitive and cannot change unless data provider subscriptions change + return ResponseToRequest.Succeeded("Chapter"); default: return ResponseToRequest.Failed($"Unknown data type: {scope.DataType}"); } @@ -184,7 +185,8 @@ public override ResponseToRequest SetExtensionData(ProjectDataScope scope, strin textWriter.Flush(); } ); - return ResponseToRequest.Succeeded($"ExtensionData:{scope.ExtensionName}"); + // The value of returned string is case sensitive and cannot change unless data provider subscriptions change + return ResponseToRequest.Succeeded($"ExtensionData"); } catch (Exception e) {