1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-23 22:15:10 -05:00

make new message for unblock

This commit is contained in:
Kyle Spearrin 2019-03-10 23:11:28 -04:00
parent a67e9a56d9
commit 2bdcff56b6

View File

@ -24,12 +24,13 @@ namespace Bit.Core.Services
public async Task BlockIpAsync(string ipAddress, bool permanentBlock)
{
await InitAsync();
var message = new CloudQueueMessage(ipAddress);
await _blockIpQueue.AddMessageAsync(message);
var blockMessage = new CloudQueueMessage(ipAddress);
await _blockIpQueue.AddMessageAsync(blockMessage);
if(!permanentBlock)
{
await _unblockIpQueue.AddMessageAsync(message, null, new TimeSpan(0, 15, 0), null, null);
var unblockMessage = new CloudQueueMessage(ipAddress);
await _unblockIpQueue.AddMessageAsync(unblockMessage, null, new TimeSpan(0, 15, 0), null, null);
}
}