fix embed queue

This commit is contained in:
sam 2024-08-13 16:48:54 +02:00
parent ded4f4db26
commit 8d4a7b1729
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
13 changed files with 188 additions and 32 deletions

View file

@ -21,7 +21,9 @@ public class MessageRepository(ILogger logger, DatabaseContext db, IEncryptionSe
ChannelId = msg.ChannelID.ToUlong(),
GuildId = msg.GuildID.ToUlong(),
EncryptedContent = await Task.Run(() => encryptionService.Encrypt(msg.Content), ct),
EncryptedContent =
await Task.Run(
() => encryptionService.Encrypt(string.IsNullOrWhiteSpace(msg.Content) ? "None" : msg.Content), ct),
EncryptedUsername = await Task.Run(() => encryptionService.Encrypt(msg.Author.Tag()), ct),
AttachmentSize = msg.Attachments.Select(a => a.Size).Sum()
};