don't track EFCore objects that don't need to be updated

This commit is contained in:
sam 2024-10-25 16:04:01 +02:00
parent d42e73699b
commit f7f88ff98f
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
24 changed files with 50 additions and 33 deletions

View file

@ -52,7 +52,7 @@ public class MessageCreateResponder(
return Result.Success;
}
var guild = await db.GetGuildAsync(msg.GuildID, ct);
var guild = await db.GetGuildAsync(msg.GuildID, false, ct);
// The guild needs to have enabled at least one of the message logging events,
// and the channel must not be ignored, to store the message.
if (guild.IsMessageIgnored(msg.ChannelID, msg.Author.ID))