1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-22 21:45:15 -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) public async Task BlockIpAsync(string ipAddress, bool permanentBlock)
{ {
await InitAsync(); await InitAsync();
var message = new CloudQueueMessage(ipAddress); var blockMessage = new CloudQueueMessage(ipAddress);
await _blockIpQueue.AddMessageAsync(message); await _blockIpQueue.AddMessageAsync(blockMessage);
if(!permanentBlock) 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);
} }
} }