Commit 411c6509 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

fix so friend count is only decremented when deny request is confirmed

parent 8d1497bb
......@@ -34,7 +34,6 @@ function approveFriend(id, tableRenderer) {
function disallowFriend(id, link) {
friendRequestWithMessage(id, link, 'disallow', friendslist);
decrementPendingFriends();
}
function decrementPendingFriends() {
......@@ -83,6 +82,7 @@ function friendRequestWithMessage(id, link, type, tableRenderer) {
if (type == 'disallow') {
// type accept due to wierdness in friend_submit caused by form wierdness in lib/user.php
pd = {'id': id, 'control': 1, 'filter': 0, 'type': 'accept', 'rejectsubmit': 'reject', 'rejectreason': $(type + '_message_' + id).value};
decrementPendingFriends();
}
else if (type == 'message') {
pd = {'id': id, 'control': 1, 'filter': 0, 'type': 'message', 'message': $(type + '_message_' + id).value};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment