Skip to content

Commit 97e0a54

Browse files
author
Lloyd Watkin
committed
Add defaults if configuration values not provided
1 parent 8ee7c46 commit 97e0a54

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • src/main/java/org/buddycloud/channelserver/channel

src/main/java/org/buddycloud/channelserver/channel/Conf.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ private static HashMap<String, String> getDefaultConf(JID channelJID) {
129129
conf.put(CREATION_DATE, formatDate(new Date()));
130130
conf.put(OWNER, channelJID.toBareJID());
131131
conf.put(ACCESS_MODEL, AccessModels.createFromString(projectConf.getProperty(
132-
Configuration.CONFIGURATION_CHANNELS_DEFAULT_ACCESSMODEL)).toString());
133-
conf.put(DEFAULT_AFFILIATION, Affiliations.createFromBuddycloudString(
134-
projectConf.getProperty(Configuration.CONFIGURATION_CHANNELS_DEFAULT_ROLE))
132+
Configuration.CONFIGURATION_CHANNELS_DEFAULT_ACCESSMODEL, AccessModels.authorize.toString())).toString());
133+
conf.put(DEFAULT_AFFILIATION, Affiliations.createFromString(
134+
projectConf.getProperty(Configuration.CONFIGURATION_CHANNELS_DEFAULT_ROLE, Affiliations.member.toString()))
135135
.toString());
136136
conf.put(NUM_SUBSCRIBERS, "1");
137137
conf.put(NOTIFY_CONFIG, "1");

0 commit comments

Comments
 (0)