[Problem] Rest Api add roster connection status not changed

Hi:

I am using Openfire 3.10.2 with Rest Api plugin version 1.1.1 I am adding roster information as you say here:

gitter-badger/REST-API-Client · GitHub

// Set Shared secret key
AuthenticationToken authenticationToken = new AuthenticationToken(“authToken”);
// Set Openfire settings (9090 is the port of Openfire Admin Console)
RestApiClient restApiClient = new RestApiClient(“openFireServer”, 9090, authenticationToken);

// Retrieve user roster
restApiClient.getRoster(“test”);

// Create a user roster entry (Possible values for subscriptionType are: -1 (remove), 0 (none), 1 (to), 2 (from), 3 (both))
RosterItemEntity rosterItemEntity = new RosterItemEntity(“test@openfireServer”, “test”, 3);
// Groups are optional
// List groups = new ArrayList();
// groups.add(“Supporter”);
// rosterItemEntity.setGroups(groups);
restApiClient.addRosterEntry(“test2”, rosterItemEntity);

This code is working great. I don´t receive confirmation message from cliente (Pidgin or Spark). The main problem is that I am not able to see the users connected. They are always disconnected. I am able to chat between both users so id is correct, but connection status is never updated. What am I missing?

I am using user status and both users are connected but I am not able to see the status from the other user client. I would like to auto update roster information.

Kind regards.

1 Like

Do you have still the problem if you restart the openfire?

PS: please use the code from https://github.com/Redor/REST-API-Client not from gitter-badger/REST-API-Client · GitHub

Thank you very much for your fast answer.

After restarting one client (pidgin or spark) it seems that it is able to get the status changes. I haven´t restarted the server only de client.