1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

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

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");