1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 10:02:47 -05:00

make event message processing idempotent

This commit is contained in:
Kyle Spearrin
2019-03-19 17:12:55 -04:00
parent 625ed1a1ee
commit fd8a8c8b67
3 changed files with 11 additions and 6 deletions

View File

@ -8,6 +8,7 @@ namespace Bit.Core.Models.Data
public EventMessage() { }
public EventMessage(CurrentContext currentContext)
: base()
{
IpAddress = currentContext.IpAddress;
DeviceType = currentContext.DeviceType;
@ -24,5 +25,6 @@ namespace Bit.Core.Models.Data
public Guid? ActingUserId { get; set; }
public DeviceType? DeviceType { get; set; }
public string IpAddress { get; set; }
public Guid? IdempotencyId { get; private set; } = Guid.NewGuid();
}
}