🐛 Trying to fix flush read receipts

This commit is contained in:
LittleSheep 2025-05-23 01:58:15 +08:00
parent a6ca869f29
commit 55f853c411

View File

@ -22,7 +22,10 @@ public class MessageReadReceiptFlushHandler(IServiceProvider serviceProvider) :
using var scope = serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<AppDatabase>();
await db.BulkInsertAsync(distinctItems, config => config.ConflictOption = ConflictOption.Ignore);
await db.BulkInsertAsync(distinctItems, config => {
config.ConflictOption = ConflictOption.Ignore;
config.UpdateByProperties = [nameof(MessageReadReceipt.MessageId), nameof(MessageReadReceipt.SenderId)];
});
}
}