🐛 Trying to fix flush read receipts
This commit is contained in:
parent
a6ca869f29
commit
55f853c411
@ -22,7 +22,10 @@ public class MessageReadReceiptFlushHandler(IServiceProvider serviceProvider) :
|
|||||||
|
|
||||||
using var scope = serviceProvider.CreateScope();
|
using var scope = serviceProvider.CreateScope();
|
||||||
var db = scope.ServiceProvider.GetRequiredService<AppDatabase>();
|
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)];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user