igniterealtime / REST-API-Client

Java REST API Client for the Openfire to manage Openfire instances by sending an REST/HTTP request to the server
Apache License 2.0
102 stars 62 forks source link

How to chat between 2 contacts #13

Closed rajscet closed 8 years ago

rajscet commented 8 years ago

Hello I have created 2 users i.e user1 and user2 Then i have added user1 to roaster of user2 and user2 to roaster of user1 with following way

RosterItemEntity rosterItemEntity = new RosterItemEntity("user1@testdomain.com", "user1", 3); // Groups are optional List groups = new ArrayList(); groups.add("Supporter"); rosterItemEntity.setGroups(groups); restApiClient.addRosterEntry("user2", rosterItemEntity);

RosterItemEntity rosterItemEntity = new RosterItemEntity("user2@testdomain.com", "user2", 3); // Groups are optional List groups = new ArrayList(); groups.add("Supporter"); rosterItemEntity.setGroups(groups); restApiClient.addRosterEntry("user1", rosterItemEntity);

Then i login with user1 in one client and login with user2 in second client user1 showing one contact user2 similarly user2 shows one contact user1 But when i sent message from user1 to user2 or user2 to user1, messages are not delivered to each other

Redor commented 8 years ago

I don't think the problem have something todo with rest api client or roster. If you are sure thats is because of the rest client, please create a new ticket.

rajscet commented 8 years ago

Now problem solved actually i was adding user like user@IP now i replace IP with server's PC name and its working