aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala')
-rw-r--r--xmpp-vala/src/module/xep/0045_muc/module.vala15
-rw-r--r--xmpp-vala/src/module/xep/0048_bookmarks.vala1
-rw-r--r--xmpp-vala/src/module/xep/0048_conference.vala3
3 files changed, 8 insertions, 11 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala
index ec10d500..aef10f9f 100644
--- a/xmpp-vala/src/module/xep/0045_muc/module.vala
+++ b/xmpp-vala/src/module/xep/0045_muc/module.vala
@@ -70,8 +70,6 @@ public class Module : XmppStreamModule {
public signal void room_name_set(XmppStream stream, Jid jid, string? room_name);
public signal void invite_received(XmppStream stream, Jid room_jid, Jid from_jid, string? password, string? reason);
- public signal void room_entered(XmppStream stream, Jid jid, string nick);
- public signal void room_enter_error(XmppStream stream, Jid jid, MucEnterError? error); // TODO "?" shoudln't be necessary (vala bug), remove someday
public signal void self_removed_from_room(XmppStream stream, Jid jid, StatusCode code);
public signal void removed_from_room(XmppStream stream, Jid jid, StatusCode? code);
@@ -226,12 +224,6 @@ public class Module : XmppStreamModule {
if (stream.get_module(ServiceDiscovery.Module.IDENTITY) != null) {
stream.get_module(ServiceDiscovery.Module.IDENTITY).add_feature(stream, NS_URI);
}
-
- room_entered.connect((stream, jid, nick) => {
- query_affiliation(stream, jid, "member", null);
- query_affiliation(stream, jid, "admin", null);
- query_affiliation(stream, jid, "owner", null);
- });
}
public override void detach(XmppStream stream) {
@@ -300,7 +292,6 @@ public class Module : XmppStreamModule {
break;
}
if (error != MucEnterError.NONE) {
- room_enter_error(stream, bare_jid, error);
flag.enter_futures[bare_jid].set_value(new JoinResult() {muc_error=error});
} else {
flag.enter_futures[bare_jid].set_value(new JoinResult() {stanza_error=error_stanza.condition});
@@ -319,7 +310,11 @@ public class Module : XmppStreamModule {
if (status_codes.contains(StatusCode.SELF_PRESENCE)) {
Jid bare_jid = presence.from.bare_jid;
if (flag.get_enter_id(bare_jid) != null) {
- room_entered(stream, bare_jid, presence.from.resourcepart);
+
+ query_affiliation(stream, bare_jid, "member", null);
+ query_affiliation(stream, bare_jid, "admin", null);
+ query_affiliation(stream, bare_jid, "owner", null);
+
flag.finish_muc_enter(bare_jid, presence.from.resourcepart);
flag.enter_futures[bare_jid].set_value(new JoinResult() {nick=presence.from.resourcepart});
}
diff --git a/xmpp-vala/src/module/xep/0048_bookmarks.vala b/xmpp-vala/src/module/xep/0048_bookmarks.vala
index 8454d711..2fd38bea 100644
--- a/xmpp-vala/src/module/xep/0048_bookmarks.vala
+++ b/xmpp-vala/src/module/xep/0048_bookmarks.vala
@@ -42,6 +42,7 @@ public class Module : BookmarksProvider, XmppStreamModule {
conference_node.put_node(new StanzaNode.build("nick", NS_URI)
.put_node(new StanzaNode.text(conference.nick)));
}
+ // TODO (?) Bookmarks 2 currently don't define a password
storage_node.put_node(conference_node);
}
}
diff --git a/xmpp-vala/src/module/xep/0048_conference.vala b/xmpp-vala/src/module/xep/0048_conference.vala
index fdc26152..b61de1c0 100644
--- a/xmpp-vala/src/module/xep/0048_conference.vala
+++ b/xmpp-vala/src/module/xep/0048_conference.vala
@@ -71,9 +71,10 @@ public class Bookmarks1Conference : Conference {
return;
}
if (password_node == null) {
- password_node = new StanzaNode.build(NODE_PASSWORD);
+ password_node = new StanzaNode.build(NODE_PASSWORD, NS_URI);
stanza_node.put_node(password_node);
}
+ password_node.sub_nodes.clear();
password_node.put_node(new StanzaNode.text(value));
}
}