api cleanup, decline message on notification decline
This commit is contained in:
@@ -568,7 +568,7 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
|
||||
senderName,
|
||||
request.HashedCid,
|
||||
onAccept: () => _pairRequestService.AcceptPairRequest(request.HashedCid, senderName),
|
||||
onDecline: () => _pairRequestService.DeclinePairRequest(request.HashedCid));
|
||||
onDecline: () => _pairRequestService.DeclinePairRequest(request.HashedCid, senderName));
|
||||
}
|
||||
|
||||
private void HandlePairRequestsUpdated(PairRequestsUpdatedMessage _)
|
||||
|
||||
@@ -220,9 +220,13 @@ public sealed class PairRequestService : DisposableMediatorSubscriberBase
|
||||
});
|
||||
}
|
||||
|
||||
public void DeclinePairRequest(string hashedCid)
|
||||
public void DeclinePairRequest(string hashedCid, string displayName)
|
||||
{
|
||||
RemoveRequest(hashedCid);
|
||||
Mediator.Publish(new NotificationMessage("Pair request declined",
|
||||
"Declined " + displayName + "'s pending pair request.",
|
||||
NotificationType.Info,
|
||||
TimeSpan.FromSeconds(3)));
|
||||
Logger.LogDebug("Declined pair request from {HashedCid}", hashedCid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user