Skip to content

Commit 77ef4a5

Browse files
bobbyg603Copilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c1f9ed6 commit 77ef4a5

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

BugSplatDotNetStandard/Api/CrashPostClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public async Task<HttpResponseMessage> PostFeedback(
101101
FeedbackPostOptions overridePostOptions = null
102102
)
103103
{
104-
var description = overridePostOptions?.Description ?? defaultPostOptions?.Description ?? string.Empty;
104+
var description = GetStringValueOrDefault(overridePostOptions?.Description, defaultPostOptions?.Description);
105105
var feedbackJson = JsonSerializer.Serialize(new Dictionary<string, string>
106106
{
107107
{ "title", title },

BugSplatDotNetStandard/BugSplat.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,7 @@ public async Task<HttpResponseMessage> PostFeedback(string title, string descrip
299299
using (var crashPostClient = new CrashPostClient(HttpClientFactory.Default, S3ClientFactory.Default))
300300
{
301301
var defaultOptions = FeedbackPostOptions.Create(this);
302-
if (!string.IsNullOrEmpty(description))
303-
{
304-
defaultOptions.Description = description;
305-
}
302+
defaultOptions.Description = description;
306303
return await crashPostClient.PostFeedback(
307304
Database,
308305
Application,

BugSplatDotNetStandard/BugSplatPostOptions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ public static XmlPostOptions Create(IXmlPostOptions options)
7373

7474
public class FeedbackPostOptions : BugSplatPostOptions
7575
{
76-
public override int CrashTypeId { get => 36; }
76+
private const int FeedbackCrashTypeId = 36;
77+
public override int CrashTypeId { get => FeedbackCrashTypeId; }
7778
public static FeedbackPostOptions Create(IBugSplatPostOptions options)
7879
{
7980
return new FeedbackPostOptions

0 commit comments

Comments
 (0)