RoomInfo: use proper boolean parser for `muc#roominfo_subjectmod`

XML allows both false/true and 0/1 syntax for booleans.

Signed-off-by: Georg Lukas <georg@op-co.de>
This commit is contained in:
Georg Lukas 2018-11-27 18:33:39 +01:00
parent 8b88f9cb20
commit b8bd10b056
1 changed files with 2 additions and 1 deletions

View File

@ -207,7 +207,8 @@ public class RoomInfo {
FormField subjectmodField = form.getField("muc#roominfo_subjectmod");
if (subjectmodField != null && !subjectmodField.getValues().isEmpty()) {
subjectmod = Boolean.valueOf(subjectmodField.getFirstValue());
String firstValue = subjectmodField.getFirstValue();
subjectmod = ("true".equals(firstValue) || "1".equals(firstValue));
}
FormField urlField = form.getField("muc#roominfo_logs");