aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0048_conference.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-12-22 04:10:53 +0100
committerMarvin W <git@larma.de>2019-12-23 16:58:53 +0100
commita0a956ee0878d24bd06be7f5d75dc4ccd4e7901d (patch)
treecbb079649066c2001b6d6881137108e70eed9d3f /xmpp-vala/src/module/xep/0048_conference.vala
parent3218dc0211ac717230fe03fad82681a626d968b5 (diff)
downloaddino-a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d.tar.gz
dino-a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d.zip
Properly check Jids everywhere
Diffstat (limited to 'xmpp-vala/src/module/xep/0048_conference.vala')
-rw-r--r--xmpp-vala/src/module/xep/0048_conference.vala10
1 files changed, 8 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/xep/0048_conference.vala b/xmpp-vala/src/module/xep/0048_conference.vala
index d78a2685..fdc26152 100644
--- a/xmpp-vala/src/module/xep/0048_conference.vala
+++ b/xmpp-vala/src/module/xep/0048_conference.vala
@@ -20,8 +20,14 @@ public class Bookmarks1Conference : Conference {
}
private Jid jid_;
- public override Jid jid {
- get { return jid_ ?? (jid_ = Jid.parse(stanza_node.get_attribute(ATTRIBUTE_JID))); }
+ public override Jid? jid {
+ get {
+ try {
+ return jid_ ?? (jid_ = new Jid(stanza_node.get_attribute(ATTRIBUTE_JID)));
+ } catch (InvalidJidError e) {
+ return null;
+ }
+ }
set { stanza_node.set_attribute(ATTRIBUTE_JID, value.to_string()); }
}