mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Bookmarks: use proper boolean parser for autojoin
Some clients (read: Gajim) store boolean values as `0` and `1` instead of `false` and `true`, which is legal for the XML boolean type. Signed-off-by: Georg Lukas <georg@op-co.de>
This commit is contained in:
parent
229653af30
commit
8b88f9cb20
1 changed files with 2 additions and 2 deletions
|
@ -269,12 +269,12 @@ public class Bookmarks implements PrivateData {
|
||||||
|
|
||||||
private static BookmarkedConference getConferenceStorage(XmlPullParser parser) throws XmlPullParserException, IOException {
|
private static BookmarkedConference getConferenceStorage(XmlPullParser parser) throws XmlPullParserException, IOException {
|
||||||
String name = parser.getAttributeValue("", "name");
|
String name = parser.getAttributeValue("", "name");
|
||||||
String autojoin = parser.getAttributeValue("", "autojoin");
|
boolean autojoin = ParserUtils.getBooleanAttribute(parser, "autojoin", false);
|
||||||
EntityBareJid jid = ParserUtils.getBareJidAttribute(parser);
|
EntityBareJid jid = ParserUtils.getBareJidAttribute(parser);
|
||||||
|
|
||||||
BookmarkedConference conf = new BookmarkedConference(jid);
|
BookmarkedConference conf = new BookmarkedConference(jid);
|
||||||
conf.setName(name);
|
conf.setName(name);
|
||||||
conf.setAutoJoin(Boolean.valueOf(autojoin));
|
conf.setAutoJoin(autojoin);
|
||||||
|
|
||||||
// Check for nickname
|
// Check for nickname
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
|
|
Loading…
Reference in a new issue