Skip to content

Commit

Permalink
Fixed issue #61 (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: Arman <[email protected]>
  • Loading branch information
armannaj and arman-purple authored Jul 11, 2022
1 parent 254a843 commit f041362
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions PurpleExplorer/Models/Message.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Text;
using Microsoft.Azure.ServiceBus;
using AzureMessage = Microsoft.Azure.ServiceBus.Message;

namespace PurpleExplorer.Models
Expand All @@ -22,7 +21,7 @@ public class Message

public Message(AzureMessage azureMessage, bool isDlq)
{
this.Content = Encoding.UTF8.GetString(azureMessage.Body);
this.Content = azureMessage.Body is not null ? Encoding.UTF8.GetString(azureMessage.Body) : string.Empty;
this.MessageId = azureMessage.MessageId;
this.CorrelationId = azureMessage.CorrelationId;
this.DeliveryCount = azureMessage.SystemProperties.DeliveryCount;
Expand Down

0 comments on commit f041362

Please sign in to comment.