aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-04-23 13:50:32 +0200
committerfiaxh <git@mx.ax.lt>2017-04-23 14:03:44 +0200
commit3eb9aa0fa79ea9fcebb5f702f81c2e54aafdc8cc (patch)
tree01d04b731296a807285621ad628e79e48ef3c077 /xmpp-vala/src/module/xep/0048_bookmarks/conference.vala
parent5c8275ed4efdc7a3a0bc2a9c3a3f46d0383ddcf4 (diff)
downloaddino-3eb9aa0fa79ea9fcebb5f702f81c2e54aafdc8cc.tar.gz
dino-3eb9aa0fa79ea9fcebb5f702f81c2e54aafdc8cc.zip
Sync MUC join/part behaviour with autojoin flag in bookmarks
Diffstat (limited to 'xmpp-vala/src/module/xep/0048_bookmarks/conference.vala')
-rw-r--r--xmpp-vala/src/module/xep/0048_bookmarks/conference.vala9
1 files changed, 8 insertions, 1 deletions
diff --git a/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala b/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala
index 21072c3f..6964f83d 100644
--- a/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala
+++ b/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala
@@ -28,7 +28,10 @@ public class Conference : Object {
public string? name {
get { return stanza_node.get_attribute(ATTRIBUTE_NAME); }
- set { stanza_node.set_attribute(ATTRIBUTE_NAME, value); }
+ set {
+ if (value == null) return; // TODO actually remove
+ stanza_node.set_attribute(ATTRIBUTE_NAME, value);
+ }
}
public string? nick {
@@ -58,6 +61,10 @@ public class Conference : Object {
}
set {
StanzaNode? password_node = stanza_node.get_subnode(NODE_PASSWORD);
+ if (value == null) {
+ if (password_node != null) stanza_node.sub_nodes.remove(password_node);
+ return;
+ }
if (password_node == null) {
password_node = new StanzaNode.build(NODE_PASSWORD);
stanza_node.put_node(password_node);