Buddy List Question

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

longnt
Posts: 19
Joined: 16 Oct 2020, 02:02

Buddy List Question

Postby longnt » 21 Sep 2021, 08:04

Hi, I'm trying to utilize the BuddyListAPI feature of SmartFox Server to implement Friend System of my application and I have some question:

1. How can I make 2 user to have buddy relation ship if my backend confirm that they're accept each other. Currently I'm using

Code: Select all

getParentExtension.getBuddyApi().addBuddy(user, id, false, true, true);

This will be expose to my backend using Servelet interface that it'll call when both user accept friend request of eachother. But currently I can see that User A have User B as Buddy (UserA's buddyList at client have count = 1) but User B's buddyList have count = 0

2. Like above how can I break the buddy relation ship of 2 user if my backend detect one user is unfriend other. If I remove buddy userB from userA buddy list will userB friendlist's automatically remove userA too?

3. How or where can I see the buddy relationship of all user in zone

4. When will the API

Code: Select all

void addBuddy(Zone zone,
              java.lang.String ownerName,
              java.lang.String buddyName,
              boolean isTemp,
              boolean fireClientEvent,
              boolean fireServerEvent)
       throws SFSBuddyListException

will be implemented, this will become very handy with my system

Sorry for my bad English

Thank you!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 43 guests