diff --git a/src/main/java/org/ntlab/nemophila/resources/accounts/RequestingRest.java b/src/main/java/org/ntlab/nemophila/resources/accounts/RequestingRest.java index 8675311..1e586dd 100644 --- a/src/main/java/org/ntlab/nemophila/resources/accounts/RequestingRest.java +++ b/src/main/java/org/ntlab/nemophila/resources/accounts/RequestingRest.java @@ -40,9 +40,12 @@ FriendManager fm = ac.getFriendManager(); FriendManager fmto = acto.getFriendManager(); - fm.addRequesting(acto); - fmto.addRequested(ac); + String actoken = ac.getToken(); + if(token.equals(actoken)) { + fm.removeRequesting(ac); + fmto.removeRequesting(acto); + } return null; } @@ -56,8 +59,11 @@ FriendManager fm = ac.getFriendManager(); FriendManager fmto = acto.getFriendManager(); - fm.removeRequesting(acto); - fmto.removeRequested(ac); + String actoken = ac.getToken(); + if(token.equals(actoken)) { + fm.removeRequested(ac); + fmto.removeRequested(acto); + } return null; }