Skip to content

Commit 3e04406

Browse files
authored
Merge pull request #7 from PromoFaux/fix/BrokePosting
Maybe one day I'll write tests.
2 parents 528662d + b1bf3d0 commit 3e04406

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Matterhook.NET.MatterhookClient/MatterhookClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ public async Task<HttpResponseMessage> PostAsync(MattermostMessage inMessage, in
9797
msgIdx++;
9898
}
9999
}
100-
}
100+
}
101101

102102
//next check for attachments on the original message object
103-
if (inMessage.Attachments.Any())
103+
if (inMessage.Attachments?.Any() ?? false)
104104
{
105105
outMessages[msgIdx].Attachments = new List<MattermostAttachment>();
106106
var msgCnt = msgIdx;

0 commit comments

Comments
 (0)