/**
* delete from o_property where name='org.olat.instantMessaging.InstantMessagingModule::issynced';
*/
//the new way to get the (singleton) ConfigurationManager
ConfigurationManager cman = (ConfigurationManager)CoreSpringFactory.getBean("olatconfigbean");
boolean isSynced = cman.findOrCreateBooleanProperty(InstantMessagingModule.class, CONFIG_SYNCED_KEY, false);
if (!isSynced) {
if (config.isSyncPersonalGroups()) InstantMessagingModule.getAdapter().synchronizeAllBuddyGroupsWithIMServer();
if (config.isSyncLearningGroups()) InstantMessagingModule.getAdapter().synchronizeLearningGroupsWithIMServer();
cman.setBooleanProperty(InstantMessagingModule.class, CONFIG_SYNCED_KEY, true);
}
// Cleanup, otherwise this subjects will have problems in normal OLAT
// operation
DBFactory.getInstance().intermediateCommit();