powered by Jive Software

Enable contact list group sharing

Hi guys , i have a problem with openfire 3.8.2 , i’m using the jdbc source to sync the user data and user group from my another system , and ther group and user list is correct , but they can not dispaly use the smack on the android , so when i open the group info , and i found the roster sharing is opened (the radio box was checked) but the group have no sharing name , so please help me , how to auto fill in the name as same as my group name , or is that a bug ? please give me a solution , i need your help , thanks a lot !

It’s the same with me. I believe it is a bug, I do not know if there is another way to fix.

But, I edited the source and recompiled. I set the displayName as the group name and saved in the database when it save in the cache (groupCache). Not sure if this can damage something else.

I changed the class:

/ Openfire / src / java / org / jivesoftware / openfire / group / GroupManager.java

Adding the method:

public void setGroupProp(Group group) {
        group.getProperties().put("sharedRoster.showInRoster", "onlyGroup");
        group.getProperties().put("sharedRoster.displayName", group.getName());
        group.getProperties().put("sharedRoster.groupList", "");      }

And calling it here (line 99):

      // Since the group Could be created by the provider, add it again possible
      groupCache.put(group.getName(), group);

and here (line 293):

      // Update caches.
      groupCache.put(name, newGroup);

thanks for your help , Henrique, i think can noly use your function to try . holping openfire team can fix this issue on ther next version.

Henrique , i used your function and the page still can not show the share group name , i used jdbc driver . is that problem?

Sorry, the code of the method was wrong, try again.

And check if appears in the table ofGroupProp

Hi @Henrique , my code is correct , and the code can not work. the database table still have no data . can you give me you openfire.jar file to me ? thanks a lot!

i use the openfire.jar file to override the old openfire.jar under the openfire/lib/openfire.jar

I used the “Custom Database Integration Guide”:

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integ ration-guide.html

And the “Building the Source” to modify and compile the source:

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/source-b uild.html

My openfire.jar will not be useful for you because I changed other things. But I’m sending it and the GroupManager.java(/Openfire/src/java/org/jivesoftware/openfire/group/GroupManager.java).
GroupManager.java.zip (5245 Bytes)
openfire.jar (7523377 Bytes)

Henrique , Thanks for your help!