Skip to content

Commit

Permalink
PR updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lyonsil committed Sep 26, 2023
1 parent df18cc3 commit c0e022c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion c-sharp/NetworkObjects/DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> { s });
}
else if (dataScope != null)
{
try
Expand Down
6 changes: 4 additions & 2 deletions c-sharp/Projects/ParatextProjectStorageInterpreter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit c0e022c

Please sign in to comment.