From 62cdb8a9b8b71ad2db24484a62f0252e290571f7 Mon Sep 17 00:00:00 2001 From: Ske Date: Tue, 28 Jul 2020 19:35:34 +0200 Subject: [PATCH] Check for avatar whitespace instead of null. This may be relevant for #206, although unsure if this is actually a fix. --- PluralKit.Bot/Services/WebhookExecutorService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Services/WebhookExecutorService.cs b/PluralKit.Bot/Services/WebhookExecutorService.cs index 5f7f62ea..3f48ba1d 100644 --- a/PluralKit.Bot/Services/WebhookExecutorService.cs +++ b/PluralKit.Bot/Services/WebhookExecutorService.cs @@ -67,7 +67,8 @@ namespace PluralKit.Bot dwb.WithUsername(FixClyde(name).Truncate(80)); dwb.WithContent(content); dwb.AddMentions(content.ParseAllMentions(allowEveryone, channel.Guild)); - if (avatarUrl != null) dwb.WithAvatarUrl(avatarUrl); + if (!string.IsNullOrWhiteSpace(avatarUrl)) + dwb.WithAvatarUrl(avatarUrl); var attachmentChunks = ChunkAttachmentsOrThrow(attachments, 8 * 1024 * 1024); if (attachmentChunks.Count > 0)