mod_bookmarks2: Fix comparison
authorKim Alvefur <zash@zash.se>
Wed, 03 Nov 2021 21:16:11 +0100
changeset 4743 fdd9e5d89d73
parent 4742 5aee8d86629a
child 4744 beeacb25dea9
mod_bookmarks2: Fix comparison The nick and password elements are children of the conference element, rather than the pubsub item element passed to the function.
mod_bookmarks2/mod_bookmarks2.lua
--- a/mod_bookmarks2/mod_bookmarks2.lua	Wed Nov 03 21:11:55 2021 +0100
+++ b/mod_bookmarks2/mod_bookmarks2.lua	Wed Nov 03 21:16:11 2021 +0100
@@ -89,10 +89,10 @@
 	end
 	local a_conference = a:get_child("conference", namespace);
 	local b_conference = b:get_child("conference", namespace);
-	local a_nick = a:get_child_text("nick", namespace);
-	local b_nick = b:get_child_text("nick", namespace);
-	local a_password = a:get_child_text("password", namespace);
-	local b_password = b:get_child_text("password", namespace);
+	local a_nick = a_conference:get_child_text("nick");
+	local b_nick = b_conference:get_child_text("nick");
+	local a_password = a_conference:get_child_text("password");
+	local b_password = b_conference:get_child_text("password");
 	return (a.attr.id == b.attr.id and
 	        a_conference.attr.name == b_conference.attr.name and
 	        a_conference.attr.autojoin == b_conference.attr.autojoin and