Groups.properties

groups.properties file is responsiable for remembering the state of the user’s contact groups when he/she signs out of Spark. I found an issue with the current code and wanted to make everyone aware of it.

Currently the groups.properties file is stored under spark user home and this locaction is global to the machine user profile. So this file would be shared should a user have multiple accounts. Most of the time a given user would only have one account, but a user could have more than one account for example a user could login to different servers and that would create different profiles, but the groups.properties file would manage both accounts.

Example:

user@internalopenfire

user@externalopenfire

The groups.properties file is currently being stored like this:

Existing Code:

propertiesFile = new File(Spark.getSparkUserHome() + “/groups.properties”);

Result for existing code:

C:\Users[username]/Spark\groups.properties

Suggested Change to store the groups.properties file like this:

Modified Code:

propertiesFile = new File(SparkManager.getUserDirectory() + “/groups.properties”);

Result for modified code:

C:\Users[username]\Spark\user[username]@openfireinternal\groups.properties

C:\Users[username]\Spark\user[username]@openfireexternal\groups.properties

This change would prevent the groups.properties file from being shared across the user’s accounts.