look at roomconfig_changesubject and roominfo_changesubject

fixes #90
This commit is contained in:
Daniel Gultsch 2023-09-06 13:47:30 +02:00
parent 1b05cbd665
commit d5ae2f4b41
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
2 changed files with 5 additions and 2 deletions

View file

@ -170,7 +170,9 @@ public class MucOptions {
}
public boolean participantsCanChangeSubject() {
final Field field = getRoomInfoForm().getFieldByName("muc#roominfo_changesubject");
final Field configField = getRoomInfoForm().getFieldByName("muc#roomconfig_changesubject");
final Field infoField = getRoomInfoForm().getFieldByName("muc#roominfo_changesubject");
final Field field = configField != null ? configField : infoField;
return field != null && "1".equals(field.getValue());
}

View file

@ -137,8 +137,9 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
builder.setMultiChoiceItems(configuration.names, values, (dialog, which, isChecked) -> values[which] = isChecked);
builder.setNegativeButton(R.string.cancel, null);
builder.setPositiveButton(R.string.confirm, (dialog, which) -> {
Bundle options = configuration.toBundle(values);
final Bundle options = configuration.toBundle(values);
options.putString("muc#roomconfig_persistentroom", "1");
options.putString("{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites", options.getString("muc#roomconfig_allowinvites"));
xmppConnectionService.pushConferenceConfiguration(mConversation,
options,
ConferenceDetailsActivity.this);