mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +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:
parent
8b88f9cb20
commit
b8bd10b056
1 changed files with 2 additions and 1 deletions
|
@ -207,7 +207,8 @@ public class RoomInfo {
|
||||||
|
|
||||||
FormField subjectmodField = form.getField("muc#roominfo_subjectmod");
|
FormField subjectmodField = form.getField("muc#roominfo_subjectmod");
|
||||||
if (subjectmodField != null && !subjectmodField.getValues().isEmpty()) {
|
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");
|
FormField urlField = form.getField("muc#roominfo_logs");
|
||||||
|
|
Loading…
Reference in a new issue