Some questions about BuddyPress friendships
Hey, I’m new here and also new with BuddyPress.
I have installed BP and I’m now trying to add some functionality within the code of my website. Right now I’m working with the friendship requests. I have a button that is showed if two persons are not friends, and when clicked, it calls (via AJAX) the BP function friends_add_friend which takes as parameter the two IDs.
First question of all: this is unbelievably slow. I use to alert the answer of my AJAX call, and that takes forever. Is this normal?
Anyhow the very important question is the following: why when I call friends_check_friendship_status it always returns me “not_friends” even though I actually called the function friends_add_friend? The funny thing is that in my DB in the table wp_bd_friends I have the correct IDs shown in the entry and 0 in “confirmed” which means that is a friendship waiting for approval (pending). This means that even though the function call was slow it worked! Yay! But still, the second function call always returns “not_friends” when it should return “pending”.
Any comments, thoughts, tips?
I’ve just tried by manually accepting the friend request (putting 1 in the column “is_confirmed”) but still the function friends_check_friendship_status returns “not_friends”. No idea what to do.
- The topic ‘Some questions about BuddyPress friendships’ is closed to new replies.